you need to ensure that both relations are populated: you set the contact into the company but not the company into the contact. so probably the contact is saved (you can check the db) but the id to company is empty...
the bidirectional relations need to be filled manually on both sides (consistency) you have only to add a line: Company company = new Company() company.setName("ACME PTY LTD"); company.setAddress("123 Test St"); Contact contact = new Contact(); contact.setName("Daniel"); contact.setTitle("Mr"); ...... CONTACT.SETCOMPANY(company) company.setContact(contact); View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3914788#3914788 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3914788 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user