How to generate entities with Objects?
- by 01
I want to generate @Enities with seam-gen from existing database. However its generates very simple version only. For Example
@Entity
@Table(name = "badges")
public class Badges implements java.io.Serializable {
private Integer id;
private **Integer userId**;
private String name;
private String date;
I want him to generate
@Entity
@Table(name = "badges")
public class Badges implements java.io.Serializable {
private Integer id;
private **User user**;
private String name;
private String date;
I even have constrain on userId and it points to column User.id
P.S. Im using MySQL5 and seam gen is using hbm2java to generate entities.