kschlesselmann
04/24/2018, 6:02 AMid
and the other using val
somehow? In order to generate equals()
only of id
it has to be the only argument in the primary constructor.
@Entity
data class Term(
@Id
val id: UUID,
val name: String
) {
val definition: Definition = Definition.DEFAULT
constructor(id: UUID, name: String, definition: Definition) : this(id, name) {
this.definition = definition
}
}
I think I'd like to do someting like this …gildor
04/24/2018, 6:07 AM