Bidirectional one-to-many associations with indexed collections in NHibernate?

This was asked 4 months ago, so I don't know if you're still interested :-).

This was asked 4 months ago, so I don't know if you're still interested :-) The conceptual reason for not supporting bidirectional indexed associations is simple: the index only makes sense in one direction. For example, consider an Invoice class with a Lines property of type IList. Setting line.

Invoice = anInvoice makes no sense, as it's impossible to determine what the list index should be. Keep in mind that Nbernate "sees" bidirectional relationships as two different relationships (hence the need for inverse="true" on the side not in charge of maintaining it) The workaround is exactly what you suggested: a Position/Index/etc property in the child class.

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