| Summary: | Cascade Persist not cascaded through managed Entities | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Gordon Yorke <gordon.yorke> |
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> |
| Status: | RESOLVED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | eclipselink.orm-inbox |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
The issue is caused by uow.isObjectNew() checks in some mappings cascadeRegisterNewIfRequired methods which do not cascade the PERSIST unless the reference object is "new". This is in conflict with the requirements of the JPA specification. Not a bug. The problem only existed because of a partial view update. The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |
In the following testcase A has OneToOne cascade PERSIST to a B which has a OneToOne cascade PERSIST to an C. The following testcase will always fail. A a = new A(); a.setB(em.find(B.class, b_id)); C c = new C(); a.getB().setC(c); em.persist(a); assertTrue("Failed to cascade persist to 'C'", em.contains(c));