Closed NoZomIBK closed 2 years ago
I do not reproduce the bug (see attached unit test). Do you use kmongo-serialization artefact? (as you use @SerialName I suppose, but ... ;) )
okay, that is actually the issue. Since some serialization obviously has to be done, even without the Serializable
annotation on the database object, i did not expect anything like that.
maybe it would help to have a warning log message when objects with kotlin-serialize annotations are given to kmongo while no kmongo-serialization is used.
Ok thank you ! https://litote.org/kmongo/quick-start/#object-mapping-engine
I wanted to have my id field named simply
id
. But it seems theMongoId
and theSerialName
annotation do not really work. Using kmongo 4.6.1This is my simple test code:
My database is the latest docker image of
mongo
document resulting in database is:
the
id
field is the actual field in my class, the_id
is autogeneratedI also tried only
SerialName
or onlyMongoId
, does not change anything.