-->
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.  [ 2 posts ] 
Author Message
 Post subject: Deleting detached objects
PostPosted: Tue Jul 21, 2009 1:41 am 
Newbie

Joined: Thu Mar 12, 2009 11:54 pm
Posts: 3
Location: India
i have associated objects .
e.g
vehicle
|__Two wheeler

i have the ids of the vehicles to be deleted. So what i am doing am creating a new object of vehicle and setting the id in it. Now i say session.delete(vehicle)
i could see reocrd only from the vehicle table are getting deleted. Child reocrds are not getting deleted.
is there a way where i can delete the child records with parent record without actually loading them??


Top
 Profile  
 
 Post subject: Re: Deleting detached objects
PostPosted: Fri Jul 24, 2009 11:24 am 
Newbie

Joined: Fri Jul 24, 2009 11:06 am
Posts: 8
Did you try deleting using HQL? (delete from Customer where id = :id)


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

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.