Можно ли выполнить загрузку с помощью HQL, не касаясь отображений? Выражение «выборка левого соединения» полностью игнорируется nHibernate.
var query = Session.CreateQuery("from o in Member left join fetch o.Photos");
query.List<Member>();
Сгенерированный SQL
SELECT this_.Id as Id7_1_, this_.Name as Name7_1_, this_.AltNames as AltNames7_1_,
this_.Tags as Tags7_1_, this_.Loved as Loved7_1_, profile2_.id as id6_0_,
profile2_.Website as Website6_0_, profile2_.Email as Email6_0_,
profile2_.Shop as Shop6_0_
FROM Member this_
left outer join member_profile profile2_ on this_.Id=profile2_.id
limit 10;
А потом 10 заявлений, захвативших фотографии. MemberProfile отображается как OneToOne.