spring-data-mongodb icon indicating copy to clipboard operation
spring-data-mongodb copied to clipboard

Generate and convert id on insert if explicitly defined.

Open christophstrobl opened this issue 3 years ago • 0 comments

We now make sure to provide an id value that matches the desired target type when no id is set, and the property defines an explicit conversion target. Previously a new ObjectId would have been generated which then leads to type inconsistencies when querying for _id.

Closes: #4026


Should be back ported to 2.7.x

christophstrobl avatar May 19 '22 08:05 christophstrobl