Litedb: Lists not being mapped in the document.

Created on 31 Mar 2017  路  3Comments  路  Source: mbdavid/LiteDB

I have a model for a document defined in the following class: https://github.com/RealBlazeIt/DEA/blob/master/src/LiteDB/Models/Gang.cs

Every time I try to access the Members list of ulongs, I get this error: "Property 'Members.y' was not mapped into BsonDocument."

Here is a specific example of when this error happens: https://github.com/RealBlazeIt/DEA/blob/master/src/LiteDB/Repository/GangRepository.cs#L94

bug

Most helpful comment

Hi @RealBlazeIt, it's a bug in linq query when convert Any. I will try fix, but Linq visitor is quite complex way. You can try for now use Query object.

Query.And(Query.EQ("GuildId", guildId), Query.Or(Query.EQ("LeaderId", userId), Query.EQ("Members", userId))

All 3 comments

Hi @RealBlazeIt, it's a bug in linq query when convert Any. I will try fix, but Linq visitor is quite complex way. You can try for now use Query object.

Query.And(Query.EQ("GuildId", guildId), Query.Or(Query.EQ("LeaderId", userId), Query.EQ("Members", userId))

Thanks, the query works, good luck with the fix!

Hi! With the objective of organizing our issues, we are closing old unsolved issues. Please check the latest version of LiteDB and open a new issue if your problem/question/suggestion still applies. Thanks!

Was this page helpful?
0 / 5 - 0 ratings