Bidirecional OneToMany from Entity with ComponentAsId doesn't fill the inverse collection on Parent load.
Description
Bidirecional OneToMany from Entity with ComponentAsId doesn't fill the inverse collection on Parent load. But on direct load of chield the association is there.. Other info: DataBase: Mysql 5.5, Mysql Connector .Net 6.6.5.0, NHibernate MySQL5 dialect,
Parent: Composed Id of types (String, int), using a ComponentAsId on the mapping by code.. Load of parent by the composite id works fine.. More then one association of other entities with this entity works fine too, only the inverse bidirecional collection inside this entity does not get loaded..
Environment
None
Activity
Alex Zaytsev
June 5, 2013 at 9:42 PM
Hey Marcio, can you please provide a test case?
Márcio Mônego Fonseca
June 5, 2013 at 7:15 PM
I found a better scenario. When main entity is loaded direct from session with Session.Load or Session.Get all works fine. My application has a form that loads a collection of main entity based on a period like Orders/Services from this Day, Week, Mouth, etc.. This was loaded by Linq provider on each change of user selection criteria.. Because I have experienced some bugs on Linq Expression processing on repository sometimes in linq provider sometimes in IQueryOver I was changing the query system and the bug becomes intermittent. When I use the linq provider with Session.Query the collection based on user criteria loads the entities without the collection of child entity loaded, but the correct sql was generated always. When the user select on grid what entity (Order/Service) he/she wants, even using Session.Get again, loads the entity from cache already without the child collection filled. If I use Generic QueryOver on repository I came back to experience bug on Expression procession on nullable DateTime mapped column. Hope this can make easy to find the solution.
Bidirecional OneToMany from Entity with ComponentAsId doesn't fill the inverse collection on Parent load. But on direct load of chield the association is there..
Other info:
DataBase: Mysql 5.5, Mysql Connector .Net 6.6.5.0, NHibernate MySQL5 dialect,
Parent: Composed Id of types (String, int), using a ComponentAsId on the mapping by code..
Load of parent by the composite id works fine..
More then one association of other entities with this entity works fine too, only the inverse bidirecional collection inside this entity does not get loaded..