_____________________________________________________________________
joshua
scott
resonant media
technologies | complex problems - creative
solutions
p.
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
|
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
|
|
More options | May 2 | |||
in the last day or two.
J
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/
|
|
More options | May 2 | |||
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/

