Senior |
|
Joined: Tue Feb 08, 2005 5:26 pm Posts: 157 Location: Montréal, Québec - Canada
|
It looks to me like you have a circular relationship between Team and TeamLead (A team needs a TeamLead and a TeamLead needs a Team) and that these relationship are enforced by constraints (not-null references).
I believe you will not be able to have it work because if you go around Hibernate, your database will not permit it because of integrity constrains.
Please post your mapping for TeamLead. I believe you only posted Team mapping information. Hibernate probably propagates the save event to the Team when saving the TeamLead object and hence the Team.lead property references a transient TeamLead.
Change your object model by allowing a team to be created without a team lead.
Does that help?
_________________ Vincent Giguère
J2EE Developer
|
|