NHibernate 2.0 - mapping a composite-id *and* many-to-one relationship causes “invalid index” error?

Kay, here's the answer. Little-to-no documentation on this.

Kay, here's the answer. Little-to-no documentation on this: This will allow you to create a composite-id made up of the inverse of a many-to-one relationship. Good hunting...

You're bang on about there being hardly any documentation on this! Could you clarify something for me a bit? What were the final class definitions like?

Are they class Person{ ISet PersonTags; } class Tag { ISet PersonTags; } class PersonTag { PersonTagKey Key; bool IsActive; } class PersonTagKey { Person Person; Tag Tag; } – mcintyre321 Sep 15 '09 at 9:10 You got it! Only difference was that I was using List, not ISet. That end up working for you?

– joshua. Ewer Sep 15 '09 at 19:09 Many many thanks for discovering this - I just rammed headlong into it. It looks like everything is required to be objects.

FYI for future searchers: you can add criterion restrictions by specifying the complete path to the relevant sub-object values: Restrictions. Eq("PersonTagKey.Person. Id", 123) – Groxx Mar 9 at 2:39.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions