|Nested cascade [message #834951]
||Mon, 02 April 2012 11:45
| Diego Silva
Registered: April 2012
Initially I'm using EclipseLink which is integrated into the WebLogic 10.35 libraries.|
I have an entity X, it has a ManyToOne relationship to Y represented as follows:
@ ManyToOne (cascade = CascadeType.PERSIST)
@ JoinColumn (name = "yid", nullable = false)
private Y y;
the entity X also has a OneToOne relationship to herself.
@ OneToOne (cascade = CascadeType.PERSIST)
@ JoinColumn (name = "xid_herself", nullable = false)
private X x;
If I have an insert operation that are present are the following:
This insertion throws an exception because it can not insert the value of y in the x attribute of entities X, because it is null. Basically it features a loop. How do I solve this problem?
Com o cascade Persist a apido eclipselink deveria resolver este conflito ?
* Recalling that the values of X and Y are merely representative.
Powered by FUDForum
. Page generated in 0.01982 seconds