I'm new to reactor and am having a small bit of trouble. Straight out of the box I'm unable to get an alias to work at all. Below is my code, and any help would be greatly appreciated.
 
I have my Reactor mode set to always and my modelglue reload set to true. I just can't seem to figure this simple piece out.
 
<reactor>
    <config>
        <project value="TestProject">
        <dsn value="TestAppOne" />
        <type value="mssql" />
        <mapping value="/model/reactor" />
        <mode value="always" />
    </config>
 
    <objects>
        <object name="tbl_users" alias="User">
            <field name="user_sk" alias="UserID">
        </object>
    </objects>
</reactor>
 
<!--- Code to instantiate reactor and create a record --->
<cfset variables.reactor = CreateObject("Component","reactor.reactorFactory").init(expandPath("/core/config/reactor.xml")) />
<cfset test = variables.reactor.createRecord('User')>
 
 
I get the following error
 

Invalid Object Type

The Type argument must be one of: table, view

 
 
 
 
 
I've done some research into the Reactor blackbox core files and this is what I'm finding is going on:
 
When passing in the alias to the createRecord method, the value never gets converted to the actual table name when the sp_tables procedure gets called in the /reactore/data/mssql/ObjectDoa.cfc object.
  <cfstoredproc datasource="#getDsn()#" procedure="sp_tables" username="#getUsername()#" password="#getPassword()#">
   <cfprocparam cfsqltype="cf_sql_varchar" scale="384" value=" #arguments.Object.getName()#" /> <---------------------------------- HERE THE arguments.Object.getName() is still "User" rather than the actual table name of "tbl_users".
   <cfprocresult name="qObject" />
  </cfstoredproc>
 
 
 
-- Reactor for ColdFusion Mailing List -- [email protected] -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/

Reply via email to