How to generate entities with Objects?
Posted
by
01
on Stack Overflow
See other posts from Stack Overflow
or by 01
Published on 2010-12-30T15:12:23Z
Indexed on
2010/12/31
8:54 UTC
Read the original article
Hit count: 191
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.
© Stack Overflow or respective owner