I need someone to correct my understanding of one-to-many. I have a many to one unidirectional relationship between two objects.
person is the parent and address is the child. The id for person is auto generated. person has a list of addresses mapped as ont-to-many with person as the owner. I create a new person, then create 2 new addresses and add them to the list. Then I call persist on the new person record. Jboss creates the person record, and generates the id (the object returned from persist has the id created by the database). Sadly the join column in the address table does not get populated with the id from the person. I would expect JBoss to populate the children (address) records with the id of the parent before persisting them. What am I missing here? Any references to documentation would be appreciated. Is this just me or is this the expected behavior? Thanks in advance. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3932477#3932477 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3932477 ------------------------------------------------------- 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 [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
