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: Using custom collection instead of native IList
PostPosted: Thu Aug 03, 2006 4:03 pm 
Newbie

Joined: Mon Jul 24, 2006 5:49 am
Posts: 1
Hibernate version: 1.2.0.Alpha1

My class has some collections that should support many-to-many association. So, I use <bag> to map my property.
If I use IList to declare collection - all OK.
But I need to make basic collection class that implements IList.
And when I have tried to do it I have caught exception with message: "Unable to cast object of type 'NHibernate.Collection.PersistentBag' to type 'VL.DataStorage.UsersCollection'."

I feel that I should use collectionPersister but I don't undersatnd how I can do it correctly. Have you any suggestion?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 04, 2006 8:23 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Here are a few posts from our development mailing list discussing how it's supposed to be done: http://sourceforge.net/search/?ml_name=nhibernate-development&type_of_search=mlists&group_id=73818&words=user+collections


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.