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.  [ 1 post ] 
Author Message
 Post subject: Sets of abstract Classes
PostPosted: Tue Jan 23, 2007 7:11 pm 
Newbie

Joined: Thu Aug 10, 2006 10:08 pm
Posts: 12
I'm trying to figure out how i can create a Set that will generally contain 3 different types of the abstract class.

Submission
-------------
+getBatches() ISet

Batch : Absract
------------------


BatchtypeA : Batch
-----------------------

BatchtypeB : Batch
-----------------------

BatchtypeC : Batch
-----------------------

So with this setup i have a table with a discriminator for A B C and Abstract classes. This works fine.

I tried just simply adding in a Set Mapping
<set name="Batches" table="Batch">
<key column="submissionID" />
<one-to-many class="Batch" />
</set>

IT builds and runs however i get a null reference exception inside Nhibernate when it tries to save. and an ADOException saying "could not save object"

I Belive this should be possible but perhaps i am taking the wrong road to it.

Thanks for any help


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.