we have a NHibernate Entity called Order. The Order has a List of Positions and some other stuff.
I now implemented a new Entity called OrderMin, which is now a base class of the Order. The same I did for the OrderPosition, which has now a base class called OrderPositionMin
When I try to load an OrderMin-Collection, I get a strange behavior: In the collection, there are now OrderMin and Order objects, this is my Code:
var mins = Session.QueryOver<OrderMin>()
.Where(x => RestrictionExtensions.IsIn(x.Id,
list))
.List();
When I take a look in the collection, the containing Order objects has now 2 Lists Positions Lists. One is from the type OrderPosition and one from OrderPositionMin.
I tried to use the override keyword in the Order Object, but this is not possible due all Properties must be virtual.
Does anyone have an idea what's going wrong here?
Thanks in advance, Dennis