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: custom collections - is bag the only mapping supported?
PostPosted: Sun Jun 08, 2008 10:52 pm 
Newbie

Joined: Sun Jun 08, 2008 9:58 pm
Posts: 3
Version: 1.2.GA

Can I create custom persistent collections for mappings other than bags?
It seems that only bags have the collection-type attribute but I need to create indexed custom collections such as arrays and maps where the index is a column in the database. All the examples I have seen on the net so far use bags. I am I missing something here?

Here is some background on why I want to do this. I need collections which track changes (added and removed items etc) compared to the last persisted state. As nhibernate replaces collection with its own implementation, there seems to be a couple of ways people get arround this. They either create a wrapper arround the nhibernate collection within the class that holds the collection or they create custom persistent collections. I thought the custom collection method seemed a little cleaner so I tried to go down this route but got stuck when I tried to create an array mapping.


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.