Setters for bidirectional 1:1 will not update the other side of the
association automatically, you have to keep track of that yourself.
JPA/Hibernate works in the way that you only have to update the side that
owns the association, the one that has the foreign key. You could argue that
the setter should update both sides and I think I would agree. Please add an
issue in jira.

/Patrik



Jef Pfeiffer wrote:
> 
> 
> In the case of a bidirectional 1:1 with inverse, A.setB() doesn’t
> initialize
> B’s reference to A (it doesn’t seem to call b.setA() such that the other
> direction isn’t initialized).
> 
> 

-- 
View this message in context: 
http://old.nabble.com/DDL-generation-error-on-1.6--tp26347787s17564p26377555.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fornax-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Reply via email to