Mapping in NHibernate 3.2 - Arrays, Custom Lists

633 views Asked by At

Looking at NHibernate 3.2 at the moment and am struggling a little with the mapping by code. Can anyone provide me with a simple example of mapping an array of strings or ints? I can't seem to find any code examples or documentation anywhere that isn't for mapping by xml.

Secondly with this new mapping by code is the limitation of having to implement IUserCollectionType for custom collections still valid?

Thanks in advance.

1

There are 1 answers

2
jolySoft On

Without any code it's a little difficult to answer but it sounds like many need a componnet:

FluentNhibernate HasMany with component

This is for use with Fluent NH, best bet if you can.

Secondly map using Fluent NHibernate, it's all code and not XML.