<Kotlin getter override + MongoDB> I'm new to Kotl...
# stackoverflow
u
Kotlin getter override + MongoDB I'm new to Kotlin development and I cannot figure out how to deal with this issue. I have the following Kotlin data class mapped to a MongoDB collection (Spring Data MongoDB): @Document(collection = "orders") data class OrderEntity @PersistenceConstructor constructor(@Id val id: ObjectId? = null, val place: String, var date: Date, val closed: Boolean = false, val price: Int = 0) I want to override the default id getter and return a string instead of an ObjectId. It seems that...