Title: RE: Reactor For CF Using "WHERE" in Reactor

You would use .isEqual(objectname,fieldname,comparevalue).

So, in your case, after you do the joins below, you would insert something like:

<cfset local.query.getWhere().isEqual("facilitator","facilitator_id",arguments.event.getvalue('facilitor_id') />

That should do it.

Michael

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Brian Billings
Sent: Saturday, February 11, 2006 3:43 PM
To: [email protected]
Subject: Reactor For CF Using "WHERE" in Reactor

All,

This function works properly. How do I say "Where facilitator_id = arguments.event.getvalue('facilitator_id')"?



        <cffunction name="ListPrograms" access="public" output="false"
returntype="ModelGlue.Core.Event">
                <cfargument name="event" type="ModelGlue.Core.Event" required="true">
                        <cfset var local = structnew() />
                        <cfset local.ProgramGateway = variables.reactor.createGateway("Program") />
                        <cfset local.query = local.ProgramGateway.createQuery() />
                        <cfset local.query.join("program","facilitator") />
                        <cfset local.query.join("program","coordinator") />
                        <cfset local.programList = local.ProgramGateway.getByQuery(local.query) />
                        <cfset arguments.event.setValue("Programs",local.ProgramList) />
                <cfreturn  arguments.event />
        </cffunction>



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

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

Reply via email to