-->
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: CascadeType.REMOVE note supported?
PostPosted: Fri May 06, 2005 2:45 pm 
Pro
Pro

Joined: Fri Nov 19, 2004 5:52 pm
Posts: 232
Location: Chicago, IL
I'm attempting to use the CascadeType.REMOVE cascade type and I'm receiving the following exception. I'm guessing that this is a bug since there is a "STYLE_DELETE" cascade style which is listed in Cascades.java?

Hibernate version: hibernate-3.0.2, hibernate-annotations-3.0beta1

Mapping documents:

Code:
@OneToMany(mappedBy="user",
   cascade=CascadeType.REMOVE)
public Collection<Shift> getShifts() {
   return shifts;
}


Full stack trace of any exception that occurs:

Code:
Caused by: org.hibernate.MappingException: Unsupported cascade style: remove
        at org.hibernate.engine.Cascades.getCascadeStyle(Cascades.java:961)
        at org.hibernate.mapping.Property.getCascadeStyle(Property.java:92)
        at org.hibernate.tuple.PropertyFactory.buildStandardProperty(PropertyFactory.java:127)
        at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:149)
        at org.hibernate.persister.entity.BasicEntityPersister.<init>(BasicEntityPersister.java:400)
        at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:104)
        at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
        at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:207)
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1055)
        at edu.uchicago.at.schedules.SessionManager.<clinit>(SessionManager.java:54)
        ... 49 more


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 09, 2005 12:02 am 
Beginner
Beginner

Joined: Mon Dec 15, 2003 5:25 am
Posts: 48
Location: Delhi, India
http://forum.hibernate.org/viewtopic.php?t=940914

_________________
Vinod K. Singh


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.