Closed salesHgabriel closed 3 months ago
it is stated in the documentation that properties need to be public. I'm guessing the Deserialization from the BsonObject
(used internally to store everything) to your User
class works only on properties with a public setter - this isn't something that's specific to LiteDb, you'll have the same issue with Newtonsoft.Json for instance.
I think you'll need to create your own BsonMapper. The Serializer needs to know how to set this property that doesn't have a public setter (I'm guessing there's a method that leads to the value being set)
Tks for your answer, I change my properties to public
Version LiteDb 5.0.21 on .net 8
Describe the bug I'm trying to use a long property with a private set, but when trying to perform a query, it doesn't display the value, but if I leave it public and it can load the value.
If private property the response is zero, but removes private, value is showing according to database.
Code to Reproduce