spring-data-mongodb
spring-data-mongodb copied to clipboard
Generate and convert id on insert if explicitly defined.
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