File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Child object is not saving. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Child object is not saving." Watch "Child object is not saving." New topic
Author

Child object is not saving.

pankaj semwal
Ranch Hand

Joined: Oct 07, 2008
Posts: 300

I have a screen where parent table has two child and having one to one mapping between parent and child's.

I want if parent is saved then child should automatically saved.But this not happening.
Where Student is parent and school and scast are its child.

Please help me....


Below are my HBM files.



Java code
Sridhar Santhanakrishnan
Ranch Hand

Joined: Mar 20, 2007
Posts: 317
How about saving the school object instead of student?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Child object is not saving.
 
Similar Threads
Exception when having different class and table name
Retereive data by ORDER BY
problem with hibernate
Hibernate how to update only one colum value
One-to-many relationship is updating entire child table with new parent id