Please let me know if my assumption is valid or not.

I have an entity bean named parent which has an autogenerated id.
I also have another entity bean named child which has an auto generated id.

The parent object has a list of child objects mapped as one-to-many in the 
parent with parent being the mappedby class.

I expect when i create a new parent then add two newly created children to the 
list, that when I persist parent, jboss will generate the id for parent then 
populate the foriegn key fields in the children classes with the newly created 
id of the parent.  Then the children will be saved with the correct parent id.

This is not what actually happens though.  As far as I can tell JBoss does not 
update the children with the parents id at all.  I leaves the foreign key to 
the parent alone, expecting that you will populate it.

Can anyone expand on how the system should behave in this case, or point me to 
the documentation that details this situation.

Thanks for any help.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3931884#3931884

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3931884


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to