-->
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: Association's CascadeType=none. How to do with Annotations ?
PostPosted: Tue Feb 26, 2008 5:02 pm 
Newbie

Joined: Sun Nov 30, 2003 8:51 pm
Posts: 4
Hibernate version:3.2

Hi There,

We're on java 1.5 and using annotations. I tried to confirm that the association that we have has a CASCADETYPE = none BUT found that the org.hibernate.annotations.CascadeType does NOT list NONE as one of the options.

http://www.hibernate.org/hib_docs/refer ... state.html Section 10.11. Transitive persistence lists that if we're using mapping files, then the default is "none". Is that the case for Annotations as well ?

If I want to explicitly set cascadeType=NONE (using annotations), how do I go about doing it ?

Thank you,

BR,
~A


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 26, 2008 7:55 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Maybe this way?

Code:
@OneToMany(cascade = {})


Didn't test it,
Sanne


Top
 Profile  
 
 Post subject: Re:
PostPosted: Thu Jun 18, 2009 10:02 am 
Newbie

Joined: Wed Apr 30, 2008 10:36 am
Posts: 4
Location: Germany
i have tested .. it works :)


s.grinovero wrote:
Maybe this way?

Code:
@OneToMany(cascade = {})


Didn't test it,
Sanne

_________________
Imran Pariyani


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.