This content has been marked as final.
Show 3 replies
-
1. Re: How to refresh an Entity instance after persisting its collection?
kingcu Feb 10, 2009 6:39 PM (in response to kingcu)Maybe my original question wasn't clear enough, so let me re-phrase it: if I have a one-to-many bidirectional relationship, after persisting an entity of the many side, how do I refresh the entity on the one side?
-
2. Re: How to refresh an Entity instance after persisting its collection?
kingcu Feb 10, 2009 6:58 PM (in response to kingcu)Just figured it out: I need to wire both sides of the relation.
Now another question: is it a good idea to override EntityHome.persist() and call wire() there?
-
3. Re: How to refresh an Entity instance after persisting its collection?
joblini Feb 10, 2009 8:55 PM (in response to kingcu)getEntityManager().refresh(entity);