Is the config in you original post the EXACT config file you have?

If so the xml is badly formed, you are missing the parent <objects> tag, without this reactor will not find the definition for your “Users” object.  You will still be able to instatiate a Users record, because the object definition is not required for this, but without the definition reactor does not know about the relationship, and will not generate the getUserTypeRecord method

It should look like this

<reactor>
  <config>
       <project value="GroundOps" />
       <dsn value="Database" />
       <type value="mssql" />
       <mapping value="/Model/Data" />
       <mode value="development" />
  </config>

<objects>
   <object name="Users">
    <hasOne name="UserType">
        <relate from="US_Type" to="UT_ID" />
    </hasOne>
   </object>
</objects>

</reactor>

Cheers, Chris

 

 

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Scott
Sent: 07 August 2006 11:41
To: [email protected]
Subject: [Reactor for CF] Trying to do this in Reactor and not working?

 

 

Ok my config file

 

<reactor>
  <config>
       <project value="GroundOps" />
       <dsn value="Database" />
       <type value="mssql" />
       <mapping value="/Model/Data" />
       <mode value="development" />
  </config>

 <object name="Users">
  <hasOne name="UserType">
      <relate from="US_Type" to="UT_ID" />
  </hasOne>
 </object>

</reactor>

And the code

<cfset UserRecord = Request.Reactor.createRecord("Users").load(US_ID = 13) />
<cfdump var="#UserRecord.getUserType()#" expand="false">

When reading the documentation this is supposed to work, but I am stumped beyond belief as to what I am doing wrong.

Anyone?


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