Hi James,

thanks for your reply. This is definitely the way I would prefer to
solve it; even before Transfer I tended to use arrays of entity
objects rather than querysets. However, I did get the vibe that
Transfer actively discourages the retrieval of multiple
TransferObjects, for what seems to be performance reasons.

In this specific case there won't ever be more than a few hundred
unique user objects, but unfortunately I can't use pagination and have
to load them all at the same time. So I'm fearing an unacceptably slow
performance. Is that correct?

regards,
Stefan

On 11 jan, 19:09, "James Allen" <[email protected]> wrote:
> Hey there Stefan,
>
> The transfer.list method only returns a query. To get your objects you then
> need to loop the query and perform a transfer.get() on the ID of each row.
> This will return an object which will have the getFullName() method in it.
> The usual way is to create an array and populate it with transfer objects.
>
> What I generally do is write my own cfquery calls to generate the query list
> and then have a base function in my gateways which builds an array of
> objects based upon a passed query (you then only need to select ID from
> table).
> I actually use a stored procedure that handles pagination (for performance)
> and then process the query returned to obtain an array of objects.
>
> Hope that helps,
> James.
>
> ---
> James  Allen
> E: [email protected]
> Blog:http://jamesallen.name
> Twitter: @CFJamesAllen (Coldfusion / Web development)
> Twitter: @jamesallenuk (General)
> Twitter: @JamesAllenVoice (Voiceover)
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
>
> On Behalf Of Mythrandir
> Sent: 11 January 2011 17:54
> To: transfer-dev
> Subject: [transfer-dev] Decorator methods and Transfer.list()
>
> Hello everybody,
>
> I've been using and learning Transfer for a couple of days now and I'm
> liking it a lot! While coding an implementation, I came across the
> following problem:
>
> I've defined an User object, and wrote a small custom decorator which
> contains the method 'getFullName()', which does concatenation of the
> User's initials and/or firstName with the lastName.
>
> However, when displaying a list of users, using the Transfer.list(),
> this method is not accessible to me, but I do need it to get the
> pretty FullName notation.
>
> I'm guessing that a lot of people have experience with this situation,
> and I'm wondering how do I best go about resolving this?
>
> thanks in advance,
> Stefan
>
> --
> Before posting questions to the group please 
> read:http://groups.google.com/group/transfer-dev/web/how-to-ask-support-qu...
> -on-transfer
>
> Try out the new Transfer ORM Custom Google 
> Search:http://www.google.com/cse/home?cx=002375903941309441958:2s7wbd5ocb8
>
> 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 
> athttp://groups.google.com/group/transfer-dev?hl=en

-- 
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

Try out the new Transfer ORM Custom Google Search:
http://www.google.com/cse/home?cx=002375903941309441958:2s7wbd5ocb8

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