Skip to content

NH-3460 - Bidirectional OneToMany from Entity with ComponentAsId doesn't fill the inverse collection on Parent load. #1308

Open
@nhibernate-bot

Description

@nhibernate-bot

Márcio Mônego Fonseca created an issue — 10th May 2013, 14:06:39:

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..


Márcio Mônego Fonseca added a comment — 10th May 2013, 14:09:23:

Sorry, MySql connector version is 6.6.5.0


Alexander Zaytsev added a comment — 13th May 2013, 5:44:23:

Please provide a test case.


Márcio Mônego Fonseca added a comment — 5th June 2013, 19:15:02:

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.

Marcio.


Alexander Zaytsev added a comment — 5th June 2013, 21:42:58:

Hey Marcio, can you please provide a test case?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions