Czar
12/25/2018, 12:59 PM@Entity
class MyEntity {
@Id
private val _id: Long? = null
@Transient
val id: Long
get () = checkNotNull(_id) { "Should not try to retrieve ID of an entity before it is persisted" }
}
Pavlo Liapota
12/25/2018, 1:46 PMNothing
type
- for stored Entity: with Long
type
Something like this https://pl.kotl.in/r1ffD2k-V but I don’t remember the exact implementation.Czar
12/25/2018, 2:17 PM