This content has been marked as final.
Show 2 replies
-
-
2. Re: Entity removal
herkules May 19, 2005 10:02 AM (in response to herkules)Thanks for reply, but it doesn't work as expected (or I don't understand the JSR-220).
Suppose the relation listed in http://www.jboss.org/index.html?module=bb&op=viewtopic&t=64136 with optional=false. There is no cascade on Child.
This code fails with "deleted object would be re-saved by cascade (remove deleted object from associations)":(on client) familyDAO.remove(1L); (server) public void remove(Long id) { manager.remove(find(Child.class, id)); }
However this code works fine:(on client) familyDAO.remove(familyDAO.loadChild(1L)); (on server) public Child loadChild(Long id) { return manager.find(Child.class, id); } public void remove(Object object) { manager.remove(object); }
Where is the difference?
Thanks for any comment. Is there anything to read about cascading/associations of EJB3.0 besides the JSR-220?
Jan