oday
10/17/2017, 12:07 PMveiset
10/17/2017, 2:27 PM@Entity
@Table
data class MyDBObject(
@Id @GeneratedValue(strategy = GenerationType.IDENTITY) var id: Int = -1,
val someProperty: Int,
val someOtherProperty: String
)
val myDBObject = MyDBObject(someProperty = 5, someOtherProperty = "hi")
myDBObject.id = 15
val mySecondObject = MyDBObject(15, 2, "hello2")
oday
10/17/2017, 5:50 PM