Doesn't the lazy one need to do more queries making it slower? Or is the end result much the same?
2009/7/1 Mark Mandel <[email protected]> > Why not just make it lazy all the time? > > Seems to me like you're just doubling your effort from not much gain. > > Mark > > On Wed, Jul 1, 2009 at 3:45 PM, Andrew <[email protected]> wrote: > >> >> Is doing this a bad idea? >> >> <object name="Thingy" table="thingy" sequence="THINGY_KEY_SEQ"> >> <id name="id" type="numeric" column="key_num"/> >> <property name="a" type="string" column="a"/> >> >> .... >> >> <onetomany name="AnotherThiny" lazy="true"> >> <link to="thingies.AnotherThingy" >> column="another_thingy_id"/> >> <collection type="array"> >> <order property="thingyNumber" order="asc"/> >> </collection> >> </onetomany> >> </object> >> >> <object name="PopulatedThingy" table="thingy" >> sequence="THINGY_KEY_SEQ"> >> <id name="id" type="numeric" column="key_num"/> >> <property name="a" type="string" column="a"/> >> >> ..... >> >> <onetomany name="AnotherThingy" lazy="false"> >> <link to="thingies.AnotherThingy" >> column="another_thingy_id"/> >> <collection type="array"> >> <order property="thingyNumber" order="asc"/> >> </collection> >> </onetomany> >> </object> >> >> >> So if I want to use lazy loading I use the "Thingy" object, but if I >> want to get a fully populated object I use the "PopulatedThingy" >> object. >> >> It works, but is it good practice? >> >> > > > -- > E: [email protected] > T: http://www.twitter.com/neurotic > W: www.compoundtheory.com > > > > > --~--~---------~--~----~------------~-------~--~----~ Before posting questions to the group please read: http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer You received this message because you are subscribed to the Google Groups "transfer-dev" 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/transfer-dev?hl=en -~----------~----~----~----~------~----~------~--~---
