Hi,
I have a entity , which i persist to do DB. This entity is having two Many toMany Relation ship
@ManyToMany @JoinTable(name = "TCOURSELL", joinColumns = { @JoinColumn(name = "ID_CO") }, inverseJoinColumns = { @JoinColumn(name = "ID_USR") }) private List<User> users = new ArrayList<User>();
@ManyToMany @JoinTable(name = "TCOANODELL", joinColumns = { @JoinColumn(name = "ID_CO") }, inverseJoinColumns = { @JoinColumn(name = "ID_CON_NOD") }) private List<Node> nodes = new ArrayList<Node>();
Everything is works fine. new member is adding fine with his parents , but unfortunately Em added two same record to db but with the different PK, all other field are same?
Can somebody will sugget me the solution.
|