I have a parent A table that has a one-to-many relationship with a table B. In the file generated with Hibernate 3.6 version.
public class A {
private B firstChild;
private B secondChild;
When i save myParent "a":
firstObject = a.getFirstChild();
session.saveOrUpdate(firstObject);
session.saverOrUpdate(a);
i have Exception: object references an unsaved transient instance - save the transient instance before flushing
In my Parent POJO I have two instances of same Table (second record have a column with ID_relation value equal ID primary first record) example
a = Progressive ID 178, Name, Surname, FK with B and ID_B ="1"
B first = ID sequence 1, Description , Price , ID REL null
B second = ID sequence 6, Description ,Price, ID REL ="1"
Thanks