Bom dia,
Tenho o seguinte problema:
Class User.class
@Table(catalog="[banco]", schema="schema", name = "user")
public class User{
@Id
Colum(name="id")
private Integer id;
Colum(name="name")
private String nome;
}
Class System.class
@Table(catalog="[banco]", schema="schema", name = "system")
public class System{
@Id
Colum(name="id")
private Integer id;
Colum(name="name")
private String nomeSistema;
}
Class Group.class
@Table(catalog="[banco]", schema="schema", name = "group")
public class Group{
@Id
Colum(name="id")
private Integer id;
Colum(name="name")
private String nomeGrupo;
}
Agora tenho:
Class UserSystem.class
@Table(catalog="[banco]", schema="schema", name = "user_system")
public class UserSystem{
@ManyToOne
@Column(name="id_user")
private List<User> userList;
@ManyToOne
@Column(name="id_system")
private List<System> systemList;
}
Class SystemGroup.class
@Table(catalog="[banco]", schema="schema", name = "system_group")
public class SystemGroup{
@ManyToOne
@Column(name="cod_idsystem")
private List<System> systemList;
@ManyToOne
@Column(name="cod_idgroup")
private List<Group> groupList;
}
O que eu uso na annotations da UserSystemGroup.class ?
@Table(catalog="[banco]", schema="schema", name = "user_system_group")
public class SystemGroup{
private List<SystemGroup> systemGroupList
private List<UserSystem> userSystemList;
}
Att.