|
Fixed and committed. Honestly, I’m not
sure if I just put a bandaid on a weird way to use the framework or not, but
the example Jared gives below works now. Doug From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jared Rypka-Hauer Yeah, it would be a reasonable expectation. ;) I can't confirm this is exactly what's happening internally, but I can
say that the following example yielded an odd result: <cfset rf =
createObject("component","reactor.ReactorFactory").init("/commonInterest/config/reactor.xml")> <cfset User =
rf.createRecord('User')> <cfdump
var="#User.load(email='[EMAIL PROTECTED]').getBuddiesIterator().getQuery()#"
label="MyBuddies web-relevant" /> <cfdump
var="#User.load(email='[EMAIL PROTECTED]').getBuddiesIterator().getQuery()#"
label="MyBuddies cfobjective" /> What was that behavior? Well the second cfdump should have been dumping
an empty query object, but it was dumping 2 rows, which is correct for the
first CFDUMP. This led me to believe that load() method wasn't resetting the
iterator... which wasn't a big deal for me at this point but could lead to some
disastrous problems later on down the line... I've been crazy busy this week so
I just didn't have time to report the bug. Anyway, just to confirm that this was the problem, I tested with this
code and it worked as expected: <cfset rf =
createObject("component","reactor.ReactorFactory").init("/commonInterest/config/reactor.xml")> <cfdump
var="#rf.createRecord('User').load(email='[EMAIL PROTECTED]').getBuddiesIterator().getQuery()#"
/> <cfdump
var="#rf.createRecord('User').load(email='[EMAIL PROTECTED]').getBuddiesIterator().getQuery()#"
/> Perfection. Also, I've been working with the from and to attributes on the link tag
and Doug, I gotta say: Good show. Works a treat and the speed imporvements have
been fab. The changes to the link tag enabled me to drop about 15 lines of custom
code from my UserRecord object, reduced my object model by one type, sped the
application up, and freed me up from having to instantiate a User that
represented the other side of the link just to get to an iterator (the record
itself was function-local, I was just instantiating it to get to the iterator
it contained.) Good stuff! J ------------------------------------------------ Jared
C. Rypka-Hauer Continuum
Media Group LLC Member,
Team Macromedia - ColdFusion "That
which does not kill me makes me stranger." - Yonah Schmeidler
On Apr 30, 2006, at 7:43 PM, Doug Hughes wrote:
|
- [Reactor For CF] Strange behaviour Erik-Jan Jaquet
- RE: [Reactor For CF] Strange behaviour Doug Hughes
- RE: [Reactor For CF] Strange behaviour Erik-Jan Jaquet
- RE: [Reactor For CF] Strange behaviour Doug Hughes
- RE: [Reactor For CF] Strange behaviour Erik-Jan Jaquet
- RE: [Reactor For CF] Strange behaviour Doug Hughes
- Re: [Reactor For CF] Strange behaviour Jared Rypka-Hauer
- RE: [Reactor For CF] Strange behaviour Doug Hughes
- Re: [Reactor For CF] Strange behaviour Jared Rypka-Hauer
- RE: [Reactor For CF] Strange behaviour Doug Hughes
- RE: [Reactor For CF] Strange behaviour Erik-Jan Jaquet
- RE: [Reactor For CF] Strange behaviour Doug Hughes

