-->
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.  [ 6 posts ] 
Author Message
 Post subject: Collections, cascade, subclasses
PostPosted: Mon Jul 05, 2004 9:47 am 
Beginner
Beginner

Joined: Mon Mar 22, 2004 10:01 am
Posts: 22
hi!

I have a collection of polymorph objects mapped like this:

Code:
<bag name="authInstruments"
   cascade="all-delete-orphan"
   inverse="true"
   lazy="true"
   access="field"
>
   <key column="userId"/>
   <one-to-many class="com.netvisor.uma.persistence.AuthInstrument"/>
</bag>


I have several subclasses of AuthInstruments.

If I add subclasses to the above collection and update the object holding this collection, then only AuthInstruments are saved i.e. only the base classes not the subclasses. This can clearly be seen by the discriminator value...

This is with the Hibernate3 CVS version, but I think it's the same with the old branch...

Am I doing anything wrong? Any ideas? Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 16, 2004 3:42 am 
Beginner
Beginner

Joined: Mon Mar 22, 2004 10:01 am
Posts: 22
No reply here, seems like I'm the only one with this issue...

Will try ro create a JIRA request and see if that helps.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 16, 2004 4:11 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Please don't.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 29, 2004 7:39 am 
Beginner
Beginner

Joined: Mon Mar 22, 2004 10:01 am
Posts: 22
christian wrote:
Please don't.


any hints? it wasn't too useful...

say that RTFM, or will not implement, or already planned, JIRA is replaced by XYZ, etc...

note: i've checked the faq, searched the current manual, forums... i couldn't read about collections + polymorphism anywhere. could be my fault, tough.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 29, 2004 10:17 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Hibernate3 CVS is not even alpha, so it makes not much sense to report bugs. We will have a new JIRA project for Hibernate3 once the alpha is out.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 02, 2004 6:00 am 
Beginner
Beginner

Joined: Mon Mar 22, 2004 10:01 am
Posts: 22
christian wrote:
Hibernate3 CVS is not even alpha, so it makes not much sense to report bugs. We will have a new JIRA project for Hibernate3 once the alpha is out.


Thanks for the longer description. IIRC I tried with the old branch, and it behaved the same... unfortunately I can't say for sure, because it's a pain to keep up two branches of my code, so i've left the old one behind.

Will get back to it when there's an official alpha/beta version out.


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