works for me... thanks for the update.

laterz,
J


------------------------------------------------

Jared C. Rypka-Hauer

Continuum Media Group LLC

http://www.web-relevant.com

Member, Team Macromedia - ColdFusion


"That which does not kill me makes me stranger." - Yonah Schmeidler


On Apr 17, 2006, at 11:55 PM, Doug Hughes wrote:

Not going to make it…. Time for bed.

 

I’ll shoot for tomorrow morning.

 

Doug

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Doug Hughes
Sent: Tuesday, April 18, 2006 12:04 AM
To: [email protected]
Subject: RE: [Reactor For CF] bug (probably buggy) commit

 

Yea… so I tend to write code the way I want it then translate it into XSL format…. Well, I forgot to remove a few references to stuff that was in my mockup code.  Oops.  The next commit should resolve this (I hope!)

 

Still coming soon.

 

Doug

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Jared Rypka-Hauer
Sent: Monday, April 17, 2006 7:30 PM
To: [email protected]
Subject: Re: [Reactor For CF] bug (probably buggy) commit

 

Doug,

 

It's generating this code:

            <cffunction name="getUser" access="public" output="false" returntype="reactor.project.CommonInterest.Record.UserRecord">

                        <cfset User = 0 />

                       

                        <!--- load the initial User record.  this will be empty --->

                        <cfif NOT StructKeyExists(variables.children, "User") OR (

                                                StructKeyExists(variables.children, "User")

                                                AND NOT IsObject(variables.children.User)

                        ) >

                                    <cfset User = _getReactorFactory().createRecord("User") />

                                    <cfset User.setParent(this) />

                                    <cfset variables.children.User = User />

                        </cfif>

                       

                        <!--- if this object has an addressID and it's not the same as the address then load the correct address --->

                        <cfif

                                   

                                    >

                                   

                                    <cfset variables.children.User.load('') />

                        </cfif>

                       

                        <cfreturn variables.children.User />

            </cffunction>

 

And it's generating it at /reactor/projects/CommonInterest/Record/MatchRecord.cfc

 

Here's the XML from my reactor.xml file:

<reactor>

            <config>

                        <project value="CommonInterest" />

                        <dsn value="CommonInterest" />

                        <type value="mysql" />

                        <mapping value="/CommonInterest/model/data" />

                        <mode value="development" />

            </config>

            <objects>

                        <object name="User" alias="User">

                                    <hasMany name="Matches">

                                                <link name="Matches" />

                                    </hasMany>

                        </object>

                        <object name="User" alias="Matches">

                                    <hasOne name="User">

                                                <relate from="userId" to="userId" />

                                    </hasOne>

                                    <hasOne name="Match">

                                                <relate from="userId" to="matchId" />

                                    </hasOne>

                        </object>

                        <object name="Match">

                                    <hasOne name="User">

                                                <link name="Matches" />

                                    </hasOne>

                        </object>

                        <object name="Interest" />

            </objects>

</reactor>

 

This change to record.project.xsl seems to have fixed the problem (first line below is line 245 in my copy of the stylesheet):

<xsl:if test="count(//hasOne/relate) &gt; 0">

            &lt;!--- if this object has an addressID and it's not the same as the address then load the correct address ---&gt;

            &lt;cfif 

                        <xsl:for-each select="relate">

                                    (Len(get<xsl:value-of select="@from" />()) AND get<xsl:value-of select="@from" />() IS NOT variables.hasOne.Address.get<xsl:value-of select="@to" />())

                                    <xsl:if test="position() != last()">OR</xsl:if>

                        </xsl:for-each>

                        &gt;

                        <xsl:for-each select="relate">

                                    &lt;cfset variables.hasOne.<xsl:value-of select="../@alias"/>.set<xsl:value-of select="@to" />(get<xsl:value-of select="@from" />()) /&gt;

                        </xsl:for-each>

                        &lt;cfset variables.hasOne.<xsl:value-of select="@alias"/>.load('<xsl:for-each select="relate"><xsl:value-of select="@to" />,</xsl:for-each>') /&gt; 

            &lt;/cfif&gt;

</xsl:if>

 

HTH,

J

 

 

------------------------------------------------

Jared C. Rypka-Hauer

Continuum Media Group LLC

http://www.web-relevant.com

Member, Team Macromedia - ColdFusion

 

"That which does not kill me makes me stranger." - Yonah Schmeidler

 

On Apr 17, 2006, at 2:56 PM, Doug Hughes wrote:

 

 

FYI – I just committed some big changes to reactor.  I’m still making more, but I didn’t want these to disappear on accident.  More details later.

 

Doug

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