Thanks.  However,  when I run that code

leaveBalancesResultQ = application.Reactor.createGateway("tblStartBalance").getByQuery(leaveBalances);

I get the following error:
*************************************************************************************************************************
The method 'getQueryFile' could not be found in component D:\Inetpub\wwwroot\Reactor\query\where.cfc. Check to ensure that the method is defined, and that it is spelled correctly.

The error occurred in D:\Inetpub\wwwroot\Reactor\base\abstractGateway.cfc: line 80

78 : <cffunction name="getByQuery" access="public" hint="I return all matching rows from the object." output="false" returntype="any" _returntype="query"> 79 : <cfargument name="Query" hint="I the query to run. Create me using the createQuery method on this object." required="yes" type="any" _type="reactor.query.query" /> 80 : <cfset var pathToQuery = Query.getQueryFile(_getConfig(), _getConvention(), "select") />
81 :         <cfset var qGet = 0 />
82 :         <cfset var queryData = StructNew() />
**************************************************************************************************************************

Not sure where to go from here.   Bug possibility?

byron


Clint Miller wrote:
When you have a "Where" instance, you can get the query results by calling getByQuery() on the gateway object:

leaveBalances = startBalance.gettblLeaveBalanceIterator().getWhere().IsEqual("tblleaveBalance","LeaveMonth",1); leaveBalancesResultQ = application.Reactor.createGateway("tblStartBalance").getByQuery(leaveBalances);

leaveBalancesResultQ should be a normal ColdFusion query object with however many rows the where object you built allows to be returned.

Clint

On Oct 19, 2006, at 10:36 PM, Byron Raines wrote:

I have the following iterator

<cfscript>
startBalanceRecord = application.Reactor.createRecord("tblStartBalance"); startBalance = startBalanceRecord.load(LeaveUserID=1,LeaveYear=2005,LeaveType=1);

   leaveBalances = startBalance.gettblLeaveBalanceIterator().getQuery();
</cfscript>

This returns the query I want.

I would like to return just a certain record from the iteration.

Can I do the following:

leaveBalances = startBalance.gettblLeaveBalanceIterator().getWhere().IsEqual("tblleaveBalance","LeaveMonth",1);

When I dump the results, I get a dump of "component reactor.query.where" and its methods.

Thanks in advance.

Byron




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



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

Reply via email to