-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deserialize not-constructor params (native) #118
Comments
Also, I found this workaround. But I'm working with 30+ fields, creating this placeholder properties is error-prone. class Document2(
@BsonId val id: Int,
_field1: String? = null,
_field2: String? = null
) {
var field1: String? = _field1
var field2: String? = _field2
}
` |
@qcho I think you forgot to use the .coroutine extension applied (your choice) to the client, database or collection. Look at these tests: https://github.com/Litote/kmongo/blob/master/kmongo-coroutine-core-tests/src/main/kotlin/org/litote/kmongo/coroutine/ReactiveStreamsFindOneTest.kt where val col by lazy { rule.col.coroutine } |
Ok. I have not seen that the properties are not in the constructor. I'm going to check that. |
Thanks for reporting, the fix is in the snapshot |
Hi.
I'm using the native driver. It seems the deserialization is not working for "not constructor" fields.
When i check the database. The data is saved properly!
I hoped it would use the public setters
The text was updated successfully, but these errors were encountered: