JP
06/10/2020, 2:39 PM@Entity class:
1. Should one NOT use data class for defining @Entity class? I’ve found some articles which say that one shouldn’t, but then I’ve also seen many sources just using them.
2. When defining the properties for an @Entity class, is there a rule to be followed for either using val or var?
3. For @Id @GeneratedValue property, what is the better way to define it: either as a nullable property initialized with null? or as a non-nullable property initialized with other dummy value?Draget
06/13/2020, 10:51 PM