-
Notifications
You must be signed in to change notification settings - Fork 934
Description
All my enum are mapped as nvarchar and the string value is persist to the database.
All my linq queries now is failing
Conversion failed when converting the nvarchar value 'Flagged' to data type int.
The enum values are
public enum ItemState
{
Ok,
Deleted,
Pending,
Flagged
}
I revert back to 5.2.7 - and hopefully a fix will be soon.
Thanks
The full exception is:
NHibernate.Exceptions.GenericADOException : Failed to execute query batch[SQL: select document0_.Id as col_0_0_, document0_.Name as col_1_0_, document0_.CourseName as col_2_0_, cast(document0_.DocumentType as nvarchar(50)) as col_3_0_, document0_.VoteCount as col_4_0_, document0_.Price as col_5_0_, document0_.CreationTime as col_6_0_, document0_.Views as col_7_0_, document0_.Downloads as col_8_0_, document0_.Purchased as col_9_0_ from sb.[Document] document0_ where document0_.UserId=? and document0_.[State]=?]
---- System.Data.SqlClient.SqlException : Conversion failed when converting the nvarchar value 'Flagged' to data type int.
at NHibernate.Multi.QueryBatch.ExecuteBatchedAsync(CancellationToken cancellationToken)
at NHibernate.Multi.QueryBatch.ExecuteAsync(CancellationToken cancellationToken)
at NHibernate.Multi.QueryBatchExtensions.FutureList1.GetValueAsync(CancellationToken cancellationToken) at NHibernate.Multi.QueryBatchExtensions.FutureEnumerable
1.GetEnumerableAsync(CancellationToken cancellationToken)
at