-->
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.  [ 4 posts ] 
Author Message
 Post subject: Collection Mapping: Entity Class and Mapping Configuration
PostPosted: Fri Jan 12, 2007 2:17 pm 
Newbie

Joined: Fri Jan 12, 2007 1:45 pm
Posts: 4
Hi. I'm brand new to NHibernate and have already ran the QuickStart example and have implemented Billy McCafferty's "Best Practices" example architecture into my current project, and read the first six chapters of documentation.

I can't seem to find the following answer:
What are all the possible entity collection classes/interfaces (eg. System.Collections.ArrayList, Dictionary, SortedList, Queue, etc.) that map to each NHibernate collection mapping (eg. <map>, <bag>, etc.)

Or phrased as the following:
What .NET class/interface types can <map> populate?
What .NET class/interface types can <bag> populate?
What .NET class/interface types can <set> populate?
What .NET class/interface types can <idbag> populate?
What .NET class/interface types can <list> populate?
What .NET class/interface types can <array> populate?
What .NET class/interface types can <primitive-array> populate?

All I can find are scattered examples, but I'm looking for a full complete list of options. This will help me make better decisions when designing the entity model.

Thanks!

Michael


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 12, 2007 7:45 pm 
Contributor
Contributor

Joined: Sat Sep 24, 2005 11:25 am
Posts: 198
From the User FAQ:

[ur]http://www.hibernate.org/359.html#A9[/url]


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 20, 2007 12:11 pm 
Newbie

Joined: Fri Jan 12, 2007 1:45 pm
Posts: 4
Thanks for the response. I read the FAQ about collection mapping.

There are some mappings that the FAQ misses.

What collection type does <array> and <primitive-array> map to? Is it System.Array or an IList with limited features? What is the difference between <array> and <primitive-array>?

Also, has anyone used <idbag>? I read it has bag semantics for collection of values and many-to-many associations, but it performs better than any other collection in this case. Can anyone please comment on their experiences with this type? Is this a common mapping being used?

Thanks again.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 16, 2007 10:34 am 
Newbie

Joined: Fri Nov 16, 2007 10:27 am
Posts: 5
What .NET class/interface types can <array> populate?
What .NET class/interface types can <primitive-array> populate?


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