On Mon, Jun 23, 2008 at 8:36 AM, Lori Stone <[EMAIL PROTECTED]> wrote:
> I have always returned query objects but apparently that is not the "best 
> practice".  I don't understand the problem with returning query
> objects.  I would love to understand the reasoning and what the return type 
> should be.

There is nothing wrong with returning queries. It really depends on
your use case. Typically, if I'm needing one record, I return a simple
object with getters/setters for each field. If I'm returning more than
one record, I return a query.

One issue with returning an array of objects instead of a query is
that if you're talking about lots of records, creating all those
objects can become processing and memory intensive.

However, one potential way around this is to use Peter Bell's
Iterating Business Object: http://ibo.riaforge.org/

-- 
Matt Williams
"It's the question that drives us."

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307962
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to