-->
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: CascadeType and @Cascade
PostPosted: Fri Aug 18, 2006 3:31 am 
Regular
Regular

Joined: Mon Mar 06, 2006 6:18 am
Posts: 95
Location: Bern, Switzerland
Hi all

could somebody pleas explain to me the difference between the two cascades defined below?

Code:
   @OneToMany(cascade = { CascadeType.REMOVE }, fetch = FetchType.LAZY, mappedBy = "taetigkeit")
   @Cascade( { org.hibernate.annotations.CascadeType.DELETE })
   public Set<ProfilTaetigkeitMapping> getProfilMapping() {
      return this.profilMapping;
   }


Is it necessary to define both? (this was generated with hibernate tools)

Regards
Angela


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 18, 2006 6:20 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
The second extends the first one (ie has more features than the spec one). You can either use one of them or mix them

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 18, 2006 6:21 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
This specific one is a tool bug, please test it on the latest version and report it to JIRA

_________________
Emmanuel


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.