The mapping
<set name="Presets" table="CAMERA_PRESET_TBL">
<key column="LNKID_CAMERA_MOUNT"/>
<one-to-many class="CameraPreset, Model"/>
</set>
session.CreateQuery("from CameraMount m left join fetch m.Presets
").List(results);
The above hql returns a cartesian product of 180 rows ... each row
contains the parent and child record, the parent record being
duplicated for each child.
session.CreateCriteria(typeof(CameraMount)).
SetFetchMode("CameraPreset", FetchMode.Join).
List(results1);
The above criteria query returns 5(parent) rows with its children (the
set) initialized.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---