-->
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.  [ 3 posts ] 
Author Message
 Post subject: Generate entities with cascade delete
PostPosted: Mon Oct 03, 2016 1:47 pm 
Newbie

Joined: Tue Feb 23, 2016 1:04 pm
Posts: 11
I am generating entities for our large database via hibernate reverse engineering. I was hoping to see cascade annotations in entities, but did not see them on generation.

Is there a way to direct hibernate to consider foreign keys and generate entities with cascade annotations, so that when i delete a parent all associated entities get automatically deleted.

Basically, I do not want to delete all associated entities & their associations one by one as its a very cumbersome task ; can hibernate reverse engineering help here?


Top
 Profile  
 
 Post subject: Re: Generate entities with cascade delete
PostPosted: Wed Nov 02, 2016 10:11 pm 
Newbie

Joined: Tue Feb 23, 2016 1:04 pm
Posts: 11
Does anybody have any ideas on this?


Top
 Profile  
 
 Post subject: Re: Generate entities with cascade delete
PostPosted: Thu Nov 03, 2016 1:41 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
Check out this StackOverflow answer.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.