http://www.cflib.org/udf/arrayOfObjectsToQuery

I always prefer to use objects, but recently I worked on a project where all
kinds of remote access was required.   json, wddx, amf, etc.  Since cfc's
have a hard time getting serialized, and when objects have extensive
inheritance, wddx conversion gets bloated.  I came up with the above
function that I didn't end up using because I didn't like the eval.

In anycase, I was thinking you could thread out a job to convert the array
of objects to a cfquery then cache it.   Maybe setup an event, whenever an
object is modified and saved, update the cached object as well?


On Tue, Jun 16, 2009 at 11:09 AM, Matt Williams <[email protected]> wrote:

>
> On Jun 16, 9:21 am, "Dan O'Keefe" <[email protected]> wrote:
> > On Tue, Jun 16, 2009 at 8:39 AM, Bob Silverberg <
> [email protected]>wrote:
> >
> > > It seems to me that the main reason that one would use a query over a
> > > collection of objects is for performance - to save the cost of creating
> all
> > > of those objects.  So if you already have a collection of objects, why
> would
> > > you want to convert them back to a query?  It seems like you'd be
> losing
> > > functionality and not gaining anything in terms of performance.
> >
> > > What sort of things would you be looking to do with a query that you
> cannot
> > > do, or wouldn't choose to do, with a collection of objects?
> >
> > Unless I am mistaken, I was thinking it would be the other way around. If
> I
> > already have cached objects I use in other places, would be quicker to
> > convert to a query, versus a hit to the database.  I know the TQL is
> cached
> > after the first hit, but a DB call versus converting it in memory.
> >
>
> I think Bob meant that if you already have the array of objects, why
> convert it to a query? Why not just return the array of objects and
> use the array in your view? No conversion, no DB hit.
>
> Matt Williams
> >
>


-- 
- Don Quist
www.SigmaProjects.org

--~--~---------~--~----~------------~-------~--~----~
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