With mongodb it's really easy, you can use default...
# spring
c
With mongodb it's really easy, you can use default param,
data class MyDoc(val id = ObjectId(),...)
Mongo's ObjectId IDs are effectively GUIDS, so it doesn't matter what generates them.