Friday, February 12, 2010

‘urn:nhibernate-mapping-2.2' has invalid child element 'property' and Fluent NHibnerate

OK – this was almost driving me crazy.

For demonstration purposes I had used the automapping feature of Fluent NHibnernate.  In a very standard way – I used all of the conventions out of the box.

Except… I forgot to check the conventions. For example for primary keys the convention is to name it Id. Exactly that! Not ID or id or anything.

2 comments:

Torkel Ödegaard said...

?? Not really sure what your point is :)

Marcus said...

Oh no... Please don't make me, Torkel. ;)

The point was that i was stupid. Ok - there you have it :)

I used conventions that i haven't checked up. In this case that the automapper feature of Fluent Nhibernate assumes that primary keys is named Id.