You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The 1.13 releases have broken DirectionalQueryField parameters (I reported this on Gitter a while ago but it got overlooked).
Exception Message:
System.ArgumentExceptionHResult=0x80070057Message=No mapping exists fromobject type System.RuntimeType to a known managed provider native type.Source=Microsoft.Data.SqlClient
StackTrace:
at Microsoft.Data.SqlClient.MetaType.GetMetaTypeFromValue(TypedataType,Objectvalue,BooleaninferLen,BooleanstreamAllowed)
at Microsoft.Data.SqlClient.MetaType.GetMetaTypeFromType(TypedataType)
at Microsoft.Data.SqlClient.SqlParameter.GetMetaTypeOnly()
at Microsoft.Data.SqlClient.SqlParameter.Validate(Int32index,BooleanisCommandProc)
at Microsoft.Data.SqlClient.SqlCommand.SetUpRPCParameters(_SqlRPCrpc,BooleaninSchema,SqlParameterCollectionparameters)
at Microsoft.Data.SqlClient.SqlCommand.BuildRPC(BooleaninSchema,SqlParameterCollectionparameters,_SqlRPC&rpc)
at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehaviorcmdBehavior,RunBehaviorrunBehavior,BooleanreturnStream,BooleanisAsync,Int32timeout,Task&task,BooleanasyncWrite,BooleaninRetry,SqlDataReaderds,BooleandescribeParameterEncryptionRequest)
at Microsoft.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehaviorcmdBehavior,RunBehaviorrunBehavior,BooleanreturnStream, TaskCompletionSource`1completion,Int32timeout,Task&task,Boolean&usedCache,BooleanasyncWrite,BooleaninRetry,Stringmethod)
at Microsoft.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1completion,BooleansendToPipe,Int32timeout,Boolean&usedCache,BooleanasyncWrite,BooleaninRetry,StringmethodName)
at Microsoft.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at RepoDb.DbConnectionExtension.ExecuteNonQueryInternal(IDbConnectionconnection,StringcommandText,Objectparam, Nullable`1commandType, Nullable`1commandTimeout,StringtraceKey,IDbTransactiontransaction,ITracetrace,TypeentityType,DbFieldCollectiondbFields,BooleanskipCommandArrayParametersCheck)
at RepoDb.DbConnectionExtension.ExecuteNonQuery(IDbConnectionconnection,StringcommandText,Objectparam, Nullable`1commandType,StringtraceKey, Nullable`1commandTimeout,IDbTransactiontransaction,ITracetrace)
at RepoDbTest.Program.Main(String[]args)in D:\Dev\Misc\Projects\RepoDbTest\Program.cs:line 23
Bug Description
The 1.13 releases have broken DirectionalQueryField parameters (I reported this on Gitter a while ago but it got overlooked).
Exception Message:
Replicating
Just use your own documentation example code from here:
https://repodb.net/class/directionalqueryfield
Note there is a typo in those docs too of ParamDirection rather than ParameterDirection.
You don't even need database objects, the runtime error will happen as soon as it attempts to convert the QueryField array into sql parameters.
The same code will work fine with RepoDb 1.12.10 / 1RepoDb.SqlServer .1.5
Library Version:
RepoDb v1.13.1 and RepoDb.SqlServer v1.13.1
The text was updated successfully, but these errors were encountered: