Okay yes, turning on debug shows that the gain is very small.  Absolutely no
point in what I was trying to do.  Having sensible indexes helps though :-)

Thanks Mark (again!).

2009/7/1 Andrew Myers <am2...@gmail.com>

> 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 <mark.man...@gmail.com>
>
> 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 <am2...@gmail.com> 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: mark.man...@gmail.com
>> 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 transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to