wood burning stoves*
The moose likes Object Relational Mapping and the fly likes Updation of child table. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Updation of child table." Watch "Updation of child table." New topic

Updation of child table.

shan blossom

Joined: Sep 06, 2006
Posts: 17
I am using one parent table and one child table.While saving the parent table child table also get saved.ie.In parent table while saving one row,more than one row (say 3 rows) are saved in child table according to my project.The problem is while updating the record,If I am setting only 2 rows in child table means,it is not getting updated in the db.All the 3 rows which was inserted while saving the record are there in db.How to update the child table in this case??
Prabhu Venkatachalam
Ranch Hand

Joined: Nov 16, 2005
Posts: 502

Are you using JDBC? or Any ORM frameworks like Hibernate?

Prabhu Venkatachalam<br />SCJP 1.4,SCWCD 1.4<br />prabhu.venkatachalam@gmail.com
shan blossom

Joined: Sep 06, 2006
Posts: 17
I am using ORM in hibernate only.
It is sorta covered in the JavaRanch Style Guide.
subject: Updation of child table.
Similar Threads
dynamic table with sort
Assign an Array to an Array Element
JPA - child insertion while parent updation is possible?
JTable - Selected row
How to Determine Whether to Insert or Update