I am using version 254 and am still having the problem.
 
I found that if I do a Load() on the record object it solves the problem, but I would think that reset should do it.
 
Any Ideas?
 
- JS
 

_____________________________________________________________________

joshua scott            
resonant media technologies | complex problems - creative solutions

p. 214.550.1818

w. http://www.resonantmedia.com

e. [EMAIL PROTECTED]

_____________________________________________________________________

 

This message is confidential and is not intended to be used by anyone other than the designated recipient. Information herein is considered privileged, proprietary, and private information. Any other use (including possession or forwarding) of this message is prohibited and will be enforced with maximum penalty under domestic and international law. We are very serious about security and confidentiality.

 

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Doug Sims
Sent: Tuesday, May 09, 2006 10:29 PM
To: [email protected]
Subject: Re: [Reactor For CF] Strange Interator Problem

you may need to get the latest from SVN. see this post from  a few days ago:




Gareth Cole  
<[EMAIL PROTECTED]> to reactor
 More options   May 2

I've got the following code:

 

currPage = application.reactor.createRecord("Page");

           

            currPage.setPageID(1);

            currPage.load();

            q1 = currPage.getPageVersionIterator().getQuery();

           

            currPage.setPageID(2);

            currPage.load();

            q2 = currPage.getPageVersionIterator().getQuery();

           

            currPage.setPageID(3);

            currPage.load();

            q3 = currPage.getPageVersionIterator().getQuery();

 

Although the contents of the page record change when I set the PK and call load(), the iterator seems to be caching the query. q1 gives the same recordset as q2 and q3, when each of them should be different.

 

I've tried calling currPage.getPageVersionIterator().reset() in between the getQuery() calls, but it makes no difference.

 

Is this a bug, or is the iterator meant to work this way?

 

Thanks

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

Reply Forward Invite Gareth to Gmail







Jared Rypka-Hauer 
< [EMAIL PROTECTED]> to reactor
 More options    May 2
Update Reactor to the latest release... that was just fixed
in the last day or two.

J
- Show quoted text -

On Tue, 2 May 2006 22:47:58 +0100
 "Gareth Cole" <[EMAIL PROTECTED]> wrote:
> I've got the following code:
>
>
>
> currPage = application.reactor.createRecord("Page");
>
>
>
>             currPage.setPageID(1);
>
>             currPage.load();
>
>             q1 =
> currPage.getPageVersionIterator().getQuery();
>
>
>
>             currPage.setPageID(2);
>
>             currPage.load();
>
>             q2 =
> currPage.getPageVersionIterator ().getQuery();
>
>
>
>             currPage.setPageID(3);
>
>             currPage.load();
>
>             q3 =
> currPage.getPageVersionIterator().getQuery();
>
>
>
> Although the contents of the page record change when I
> set the PK and call
> load(), the iterator seems to be caching the query. q1
> gives the same
> recordset as q2 and q3, when each of them should be
> different.
>
>
>
> I've tried calling
> currPage.getPageVersionIterator().reset() in between the
> getQuery() calls, but it makes no difference.
>
>
>
> Is this a bug, or is the iterator meant to work this way?
>
>
>
> Thanks
>
>
>
>
>
> -- 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 Forward Invite Jared to Gmail







Gareth Cole 
<[EMAIL PROTECTED] > to reactor
 More options    May 2
Thanks Jared. It works perfectly now

On 5/9/06, Joshua Scott < [EMAIL PROTECTED]> wrote:

All,

I have having a strange iterator problem. I am creating a multi-lingual CMS
and created a test page for English and Spanish.

<!--- Pull Record Object from MG Viewstate --->
<cfset PageContent = viewstate.getValue("PageContent") />
<!--- Create Iterator --->
<cfset contentIterator = PageContent.getPageContentIterator() />

<cfoutput>
Spanish:<br>
<cfset contentIterator.reset() />
<cfset contentIterator.getWhere().isEqual("PageContent","cid",2) />
#contentIterator.getQuery().content#<br><br>

English:<br>
<cfset contentIterator.reset() />
<cfset contentIterator.getWhere().isEqual("PageContent","cid",1) />
#contentIterator.getQuery().content#<br><br>


The problem is I get content for the first one but not for the second. The
both have content.

Any ideas?

Thanks,

Josh



------------------------------------------------
Joshua Scott
Resonant Media Technologies, LLC.
http://www.resonantmedia.com | http://ponderings.wordpress.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/



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