I am facing a issue regarding the migration from NHibernate 2.1.2 + Fluent 1.0 to NHibernate 3.1 + Fluent 1.2 :
Used to work :
List<Order> orders = session.Linq<Order>()
.Where(o => o.OrderLines.Any(ol => printStatuses.Contains(ol.PrintStatus)))
.ToList();
Don't work anymore
List<Order> orders = session.Query<Order>()
.Where(o => o.OrderLines.Any(ol => printStatuses.Contains(ol.PrintStatus)))
.ToList();
We get the following error :
"Could not load type o.OrderLines. Possible cause: the assembly was not loaded or not specified."
OrderLines is a collection property of the class Order, typed IList<OrderLine>
NHibernate seems to not be able to get the fully qualified class name of that collection. Though, looking at the session factory, we can see that collectionRolesByEntityParticipant dictionary contains a key for the class OrderLine with a dictionary value pointing to Order.Orderlines.
Has anyone solved this ?
EDIT :
PS : We use automapping in case you wonder.