0

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.

Gert Arnold
  • 105,341
  • 31
  • 202
  • 291
David
  • 1,731
  • 24
  • 37

1 Answers1

1

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.

Community
  • 1
  • 1
jolySoft
  • 2,948
  • 2
  • 30
  • 34
  • Hi Joly. I'm looking at ORMs for work and Fluent would get shot down because it's an extra dependancy on an already 3rd party tool. Also with these new features in 3.2 (albeit not as well done as Fluent) it appears that Fluent might end up being no longer supported or left to stagnate. I've visited ORM's before and it always ends up looking like they are more hassle than they are worth. – David Jan 13 '12 at 14:10
  • IMHO Fluent is now too big to just stagnate but yes your right. I think it will end up the of NHibernate.linq and become part of the framework itself. I which case your just future proofing . . . If they shoot you down for fluent then I'll shot them for you ;) NH is great, don't give up, it's worth it – jolySoft Jan 13 '12 at 14:31