I'm a little confused about how a CMP entity bean that has 1-M relationship link to a
subordinate entity should handle the creation new subordinate entity instances.
For instance,...
class Entity1Bean {
ejbCreate(....)
Collection getEntity2List() // returns collection of 'Entity2'
}
class Entity2Bean {
ejbCreate(....)
}
At the moment I'm handling the creation of new Entity2 instances by....
Entity2Home.create(....)
However, when I then use 'Entity1Home.getEntity2List' to retrieve a list of
linked sub entities the newly created Entity2 instance is not part of the
list.
I then tried adding.....
aNewEntity1 = Entity2Home.create(....)
Entity1Home.getEntity2List().add(aNewEntity1);
... and it still didn't work. What am I doing wrong?
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3848420#3848420
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3848420
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user