-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Parent-child relationship between dependent objects
PostPosted: Wed Nov 05, 2008 11:21 am 
Newbie

Joined: Tue Jun 24, 2008 6:06 am
Posts: 5
I have an entity called Department. Department has a collection of Students.
Student is another entity.
I work with Students only via a Department object. I get a Department with all its Students, I work with it (edit, delete, add Students) and then merge it back. This works well when the objects are all managed.

I have to make a web service that does exactly the same.
The web service has to have all the CRUD operations on a Department.
createDepartment
updateDepartment
getDepartment
deleteDepartment.

Everything works fine.
Except for a slight problem: If I get a department, remove a single user, and then update it - nothing happens, the Student is not deleted.

I guess it has something to do with the objects being disconnected/unmanaged.
How do I fix that?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.