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 Problem in Updating the Child Table records Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Object Relational Mapping
Reply Bookmark "Problem in Updating the Child Table records" Watch "Problem in Updating the Child Table records" New topic
Author

Problem in Updating the Child Table records

Amos Matt
Greenhorn

Joined: Mar 30, 2007
Posts: 14
i am using a User:Table which has a child table UserRole:Table

I have inserted a record in User, two child records for the same UserRole using a test client. But while updating the the same user, i gave only one record for the child table.

But i can one record is updating and another is still there. Can you please tell me how can i solve the problem.

Thanks in adv.,
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 16622

Hi Andy, I am going to move this to the ORM forum.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Halcon Guatemala
Ranch Hand

Joined: Sep 06, 2006
Posts: 57
Hi Andy, could you show us more about your design or mapping resources?
Thanks in advance


"La verdadera sabidur�a viene del temor de Dios"
Rashid Darvesh
Ranch Hand

Joined: Feb 13, 2004
Posts: 189
Are you using JPA or hibernate.
here are some using for both of them
http://www.makemyinfo.com/Tutorial.do?action=first

Rashid
karthick swami
Greenhorn

Joined: May 14, 2007
Posts: 4
First read(load) two records of UserRole ,have one record(which you needed to update) and make the other record null and set into the User object.Do a save of User object atlast.

By this way the unwanted record of user role will not exist.

Hope this helps.
 
 
subject: Problem in Updating the Child Table records
 
Threads others viewed
Record Locking in multi-user
Updation of child table.
Problem in Extending a POJO
DAO batch processing
Row locking using oracle database
developer file tools