v3 Error on inserting: Can only unbox from an object or interface type to a value type.
See original GitHub issueHi,
i’m trying out the new v3 in a Xamarin.Forms project.
When i try to insert a new object into a new collection i get this error message:
Unhandled Exception: System.ArgumentException: Can only unbox from an object or interface type to a value type. at System.Linq.Expressions.Expression.Unbox (System.Linq.Expressions.Expression expression, System.Type type) [0x00051] in /Users/builder/data/lanes/3511/77cb8568/source/mono/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Ast/UnaryExpression.cs:678 at LiteDB.Reflection.CreateGenericSetter (System.Type type, System.Reflection.MemberInfo memberInfo) [0x00086] in <69119786c28e4052b478158c5831f742>:0 at LiteDB.BsonMapper.BuildEntityMapper (System.Type type) [0x0010e] in <69119786c28e4052b478158c5831f742>:0 at LiteDB.BsonMapper.GetEntityMapper (System.Type type) [0x00031] in <69119786c28e4052b478158c5831f742>:0 at LiteDB.BsonMapper.SetAutoId (System.Object entity, LiteDB.LiteCollection
1[T] col) [0x0003e] in <69119786c28e4052b478158c5831f742>:0 at LiteDB.LiteCollection
1[T].Insert (T document) [0x0003c] in <69119786c28e4052b478158c5831f742>:0
It doesn’t matter if i only insert one object or a list of objects.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top GitHub Comments
Ok, it’s now published
yes @vkocjancic, will be “beta-2”, but only this weekend because i’m out of office this week.