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

Reply via email to