from CameraMount m left join fetch m.Presets and select m from CameraMount m left join fetch m.Presets
have the same result. On May 21, 11:23 am, Fabio Maulo <[email protected]> wrote: > wrong HQL to be compared with that CriteriaFor second time... > select m from CameraMount m left join fetch m.Presets > > 2009/5/21 chewzoey <[email protected]> > > > > > > > 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. > > -- > Fabio Maulo --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
