qoollo/bricksdb

When MetaTable created by InitDb it has a key column named as 'Id' ('Meta_Id' expected)

Opened this issue · 1 comments

11.01.2017 20:41:01. ERROR.
At ConsoleLogger.[StorageSystemLogger.Impl].::StartInner.
Message: Command = select MetaTable_DataEntity.Meta_Local, MetaTable_DataEntity.Meta_IsDeleted, MetaTable_DataEntity.Meta_DeleteTime, MetaTable_DataEntity.Meta_Id as 'MetaId', HelpTable.Id as 'UserId', MetaTable_DataEntity.Meta_Hash from ( SELECT Id, Text FROM DataEntity ) as HelpTable right join MetaTable_DataEntity on HelpTable.Id = MetaTable_DataEntity.Meta_Id where MetaTable_DataEntity.Meta_Id = @Meta_Id.
Exception: System.Data.SqlClient.SqlException: Invalid column name 'Meta_Id'.
Invalid column name 'Meta_Id'.
Invalid column name 'Meta_Id'.
Source: .Net SqlClient Data Provider
StackTrace: в System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) в System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)
в System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
в System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
в System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
в System.Data.SqlClient.SqlDataReader.get_MetaData()
в System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption)
в System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
в System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
в System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
в System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
в System.Data.SqlClient.SqlCommand.ExecuteReader()
в Qoollo.Impl.Sql.Internal.SqlReader.StartInner() в F:\Work\Qoollo\BricksDB\src\StorageSystem.Impl.Sql\Internal\SqlReader.cs:строка 71

By this fix you lost the Id column data type.
Originally idInit looks like Id BIGINT. Current _keyName does not contain such data type definition.