Please log this as a bug on http://trac.reactorframework.com.  Would everyone agree that the solution would simply be to remove the word “inner” from inner joins?  I think this should consistently work cross dbms.

 

Doug

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Newby Matthew S CONT PORT
Sent: Tuesday, June 13, 2006 4:58 PM
To: '[email protected]'
Subject: Re: [Reactor for CF] Oracle?

 

Doug,

 

Based on my initial testing with Oracle 8i, I think there might be a problem with the link tag.  Of course, I just got Reactor working today, so it's quite likely I've made a mistake somewhere...  :-)

 

I have three tables, a users table, a roles table, and a users_roles linking table (actually, I've got close to 40 tables, but I'm starting small with reactor).  My Reactor.xml file has something like the following in the objects tag:

<objects>

  <object name="MYAPP_USERS">

    <hasOne name="USER_STATUS_REF">

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

    </hasOne>

    <hasMany name="USER_NETWORK_ACCOUNTS">

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

    </hasMany>

    <hasMany name="ROLE_DEFS_KEY">

      <link name="USERS_ROLES"/>

    </hasMany>

  </object>

 

  <object name="USERS_ROLES">

    <hasOne name="MYAPP_USERS">

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

    </hasOne>

    <hasOne name="ROLE_DEFS_KEY">

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

    </hasOne>

  </object>

 

  <object name="ROLE_DEFS_KEY">

    <hasMany name="MYAPP_USERS">

      <link name="USERS_ROLES"/>

    </hasMany>

  </object>

</objects>

So, I created a page and instanced the reactor object and added the following CF code, following the examples in the incomplete but excellent documentation:

<cfset UserRecord = reactor.createRecord("MYAPP_USERS").load(USER_SA_ID=15)/>
<cfset qRoles = UserRecord.getROLE_DEFS_KEYIterator().getQuery()/>

The SQL used for the getQuery() is something like:

SELECT

    "ROLE_DEFS_KEY"."ROLE_DESCRIPTION" AS "ROLE_DESCRIPTION",

    "ROLE_DEFS_KEY"."ROLE_ID" AS "ROLE_ID",

    "ROLE_DEFS_KEY"."ROLE_NAME" AS "ROLE_NAME",

    "ROLE_DEFS_KEY"."SHOW" AS "SHOW"

FROM

    "MYAPP"."ROLE_DEFS_KEY" "ROLE_DEFS_KEY"

    INNER JOIN "MYAPP"."USERS_ROLES" "USERS_ROLES"

        ON "ROLE_DEFS_KEY"."ROLE_ID" = "USERS_ROLES"."ROLE_ID"

WHERE

    "USERS_ROLES"."USER_SA_ID" = 15

The INNER JOIN ... ON syntax is not recognized by Oracle 8i.  ColdFusion throws a Database error of "[Macromedia][Oracle JDBC Driver][Oracle]ORA-00933: SQL command not properly ended".  TOAD croaks on a copy of the query on the word "INNER", with the same ORA-00933 error.

 

I have another copy of my database in Oracle 10g and am able to run the query in TOAD with no problems there.

 

My $0.02 worth,

 

-matt

 


Matthew Newby
PNS Web Services
PH: 207-438-5263
email: [EMAIL PROTECTED]


When digitally signed, the signature is in accordance with DoDI 8520.2, dated 1 Apr 2004.

On Sat, 03 Jun 2006 15:16:23 -0700, Doug Hughes wrote:

Hey people -

I can't remember if reactor works with Oracle 8i or not.  (Muchless 9i or 10whatever.)

 

Beth - Any chance you could tell me which versions it works with?

 

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