Hmm, maybe you should just forego Transfer's composition and deal with it
directly in the decorator.  That sounds like a more scalable solution to me.

On Fri, Mar 13, 2009 at 8:15 AM, Brian Kotek <[email protected]> wrote:

> How large is "a large number of objects"? What you probably need to do is
> revisit the relationship since you shouldn't be using oneToMany in
> situations where there are a large number of objects. Use manyToOne.
>
> But you can override the configure() method in the Decorator. From the
> documentation:
> Setting up values in the Decorator
>
> configure()<http://docs.transfer-orm.com/html/transferapi/transfer/com/TransferDecorator.html#configure%28%29>on
>  the TransferDecorator will be run when the object is first created. You
> can overwrite this when you implement your own Decorator CFC, and is a
> perfect place to set default values for your Transfer Object.
>
> It should be noted that configure() is run *before* the object is
> populated, and therefore, any values it sets will be overwritten by those
> retrieved from the database.
>
> You might also look at using the Transfer Proxies for this relationship
> instead of the real objects.
>
>
>
>
> On Fri, Mar 13, 2009 at 5:33 AM, John Whish <[email protected]>wrote:
>
>>
>> Hi, I know there is the configure method of a decorator which runs
>> before the object is populated. Is there a method that runs after the
>> object is populated? I have a onetomany relationship which creates
>> lots of objects which are basically a "name-value" pair, which could
>> have a performance impact (the cache has to run out of space at some
>> point!) so I'd like to parse these into a simple struct which is
>> stored in the User object and then destroy all the onetomany objects.
>>
>> Transfer.xml Snippet:
>> <package name="member">
>>        <object name="User" table="USERS"
>> decorator="com.model.member.User">
>>
>>                <id name="UserID" column="user_id" type="GUID"
>> generate="true" />
>>                <property name="Email" column="user_email" type="string"
>> nullable="false" />
>>
>>                <onetomany name="UserAttributes" lazy="false"
>> proxied="false">
>>                        <link to="member.UserAttributes" column="user_id"
>>  />
>>                        <collection type="struct">
>>                                <key property="Key" />
>>                        </collection>
>>                </onetomany>
>>
>>        </object>
>>
>>        <object name="UserAttributes" table="USERATTRIBUTES">
>>                <id name="UserAttributeID" column="userattribute_id"
>> type="numeric"
>> generate="true" />
>>                <property name="Key" column="userattribute_key"
>> type="string" />
>>                <property name="Value" column="userattribute_value"
>> type="string" />
>>        </object>
>>
>> </package>
>>
>> Thanks!
>>
>>
>>
>>
>
> >
>


-- 
Bob Silverberg
www.silverwareconsulting.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
-~----------~----~----~----~------~----~------~--~---

Reply via email to