Why not just use the getByFields()?

<cfset ministryGateway = reactor.CreateGateway("Ministries") />
<cfset ministries =
ministryGateway.getByFields(parentId=somevalue)>
<cfdump var="#ministries#">

On 7/25/06, Joshua Scott <[EMAIL PROTECTED]> wrote:
All.
 
I am trying to mimic this query:
 
SELECT     *
FROM         Ministries
WHERE     (parentID = id)
 
in reactor. "Id" is the primary key. The query returns 7 records, but when I do the following in reactor:
 
  <cfset GetMinistries = reactor.CreateGateway("Ministries") />
  <cfset query = GetMinistries.CreateQuery() />
  <cfset query.getWhere().isEqual("Ministries","ParentID",id)/>
  <cfset arguments.event.SetValue("GetMinistries", GetMinistries.GetByQuery(query)) />
 
it only returns 1 record. I know that the reason is that "id" in the reactor isEqual() function is not the correct way to do it.
 
The question is... how do I refer to a an internal relationship in the table with isEqual() rather than comparing the table to an external value?
 
Thanks for the help.
 
- Josh
 
 
 

------------------------------------------------
Joshua Scott
Resonant Media Technologies, LLC.
http://www.resonantmedia.com | http://blog.resonantmedia.com
 

"It is impossible to get out of a problem by using the same type of thinking that it took to get into the problem." -- Albert Einstein
 

 

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



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

Reply via email to