so if I have a data class that Im going to create ...
# getting-started
o
so if I have a data class that Im going to create a table according to, I dont want to be instantiating it with ID
v
Are you thinking about something along these lines:
Copy code
@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")
o
yea that’s what I did