Hello, Well, the reason i am doing that is because our relational model is a very complex object graph and there is a lot of data in the associated tables. Because of that, when requesting certain objects , the queries are becoming huge and i am seeing a lot of outer joins to create objects i will never access or need. This is becoming a real performance bottleneck in a high usage scenario.
Thanks On Wednesday, May 15, 2013 3:23:37 AM UTC-5, Frédéric Delaporte wrote: > > I had tested my case with a sql profiler prior posting and querying (hql + > .List<Lot>) my "Lot" class mapped as shown. It does not issue any left join > on LOT_INDICATEUR. Without having to specify lazy attribute. > But the call to IQuery.List<Lot>() does indeed issue at once a list of > select on lot_indicateur after the select on Lot, which is clearly not > lazy. My apologies for that, I had only check that the LotIndicateur > loading was "looking separated" in sql profiler, not that it was really > occuring only on access to its corresponding property on Lot. > > (On my real code it does not cause any issue though, since my real HQL > does purposely a "left join fetch lot.Indicateurs", which I had removed for > looking which queries would then be issued in sql profiler.) > > So I have no solution for avoiding any kind of access on the "child" table > of the one-to-one relationship, when accessing a "master" entity, sorry. > (Mapping that as collections looks to me as a bit too convoluted for > achieving your desired loading behavior. Too far from "keep it simple" > principle) > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/nhusers?hl=en-US. For more options, visit https://groups.google.com/groups/opt_out.
