reactor  

Re: [Reactor for CF] What is the best way for this problem

Andrew Scott
Tue, 21 Nov 2006 22:01:43 -0800

Teddy that is ok, but that wasn't my problem. My problem lies in should I
expose reactor to my views to call the DB again :-)



On 11/22/06, Teddy Payne <[EMAIL PROTECTED]> wrote:

My apologies for trying to assist.

Teddy

On 11/21/06, Andrew Scott <[EMAIL PROTECTED] > wrote:
>
>  Teddy,
>
>
>
> Because the actual code for the query is not in my controller, it is in
> my model code, the createobject would have been the giveaway for thatJ
>
>
>
>
> Senior Coldfusion Developer
> Aegeon Pty. Ltd.
> www.aegeon.com.au
> Phone: +613  8676 4223
> Mobile: 0404 998 273
>  ------------------------------
>
> *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED]
> *On Behalf Of *Teddy Payne
> *Sent:* Wednesday, 22 November 2006 12:52 AM
> *To:* reactor@doughughes.net
> *Subject:* Re: [Reactor for CF] What is the best way for this problem
>
>
>
> If you want to write the query using Reactor, why not use Model-Glue's
> Orm Service?
>
> <cfset reactor = getModelGlue().getORMService()>
>
> I have that inside my controllers to start writing queris like:
>
> <cfset reactor = getModelGlue().getORMService()>
>
> <cfset userGateway = reactor.createGateway("tblUser")>
> <cfset query = userGateway.createQuery()>
> <cfset query.returnObjectFields ("tblUser",
> "userID,email,firstName,lastName") />
> <cfset where = query.getWhere()>
> <cfset where.IsEqual("tblUser","email",arguments.event.getValue("email"))>
>
> <cfset where.setMode("and")>
> <cfset where2 = where.createWhere()>
>  <cfset where2.isEqual("tblUser","password",arguments.event.getValue
> ("password"))>
>  <cfset where.addWhere(where2)>
>  <cfset qryUser = userGateway.getByQuery(query)>
>
> It looked like you injected your reactor factory after the reactor
> factory is already present.
>
> Teddy
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> -- -- --
> Reactor for ColdFusion Mailing List
> reactor@doughughes.net
> Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> -- -- --
>



--
<cf_payne />
Adobe Certified ColdFusion MX 7 Developer
Atlanta CFUG (ACFUG): http://www.acfug.org
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Reactor for ColdFusion Mailing List
reactor@doughughes.net
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --




--



Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  8676 4223
Mobile: 0404 998 273


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
reactor@doughughes.net
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --