|
Bayo, It’s best not to change the core
tables. I’d suggest reverting to the standard reactor.core.field. The
issue is with the Oracle-specific part. For reactor to work with Oracle
8i, the statements using the SQL standard “LEFT JOIN” need to be
changed to use Oracle’s “+” syntax. The reason only
the primary key is being returned is that the query I provided didn’t use
the “+” syntax. This should work: SELECT col.COLUMN_NAME as name, CASE WHEN colCon.CONSTRAINT_NAME IS NOT NULL THEN 'true' ELSE 'false' END
as primaryKey, /* Oracle has no equivalent to
autoincrement or identity */ 'false' AS "IDENTITY", col.NULLABLE, col.DATA_TYPE as dbDataType, col.DATA_LENGTH as length, col.DATA_DEFAULT as "DEFAULT" FROM all_tab_columns col,
all_cons_columns colCon,
all_constraints tabCon where col.table_name =
<cfqueryparam cfsqltype="cf_sql_varchar" scale="128"
value="#arguments.Object.getName()#" /> and col.COLUMN_NAME = colCon.COLUMN_NAME (+) AND col.TABLE_NAME
= colCon.TABLE_NAME (+) AND colCon.CONSTRAINT_NAME = tabCon.CONSTRAINT_NAME (+) AND colCon.TABLE_NAME = tabCon.TABLE_NAME (+) AND 'P'
= tabCon.CONSTRAINT_TYPE (+) Try outside of ColdFusion and see if it
returns all fields. Beth Bowden Phone: 919-541-3355 FAX: 919-541-3687 From: bayo Ojo
[mailto:[EMAIL PROTECTED] Hello, I have explored createGateway and
createRecord commands so far. Well, I was able to get createGateway to
return just a column (the primary key filed) by making these modifications:
To
<cffunction name="setPrimaryKey" access="public"
output="false" returntype="void">
<cfargument name="primaryKey" hint="I indicate if the colum
is part of the primary key" required="yes"
type="string" />
<cfset variables.primaryKey = arguments.primaryKey /> </cffunction> <cffunction
name="getPrimaryKey" access="public"
output="false" returntype="string">
<cfreturn Iif(trim(variables.primaryKey), DE('true'), DE('false')) /> </cffunction> Note the returntype changed from boolean
to string and the trim function around the variable.primaryKey. Which I guess
is because of the string data type With the createRecord I only get set/get
function for just the primary key field. No set/get was returned for any other
fields in the table. I guess the problem is with this query in
reactor.data.oracle.objectdao <cfquery name="qFields"
datasource="#getDsn()#" username="#getUsername()#"
password="#getPassword()#">
SELECT col.column_name AS NAME , CASE
WHEN colcon.constraint_name IS NOT NULL THEN 'true'
ELSE 'false' , col.nullable , col.data_type
AS dbdatatype , col.data_length
AS LENGTH ,
col.data_default AS "DEFAULT" FROM all_tab_columns col,
all_constraints tabcon,
all_cons_columns colcon WHERE col.table_name =
<cfqueryparam cfsqltype="cf_sql_varchar" scale="128"
value="#arguments.Object.getName()#" /> and
col.column_name = colcon.column_name AND
col.table_name = colcon.table_name AND
colcon.constraint_name = tabcon.constraint_name
and col.table_name = tabcon.table_name AND
tabcon.constraint_type = 'P' </cfquery> that returns just the primary key
field. Bayo Ojo |
RE: [Reactor For CF] Is Reactor oracle 8i compliant?
Bowden, Beth \(NIH/NIEHS\) [E] Wed, 05 Apr 2006 10:22:27 -0700
- [Reactor For CF] Is Reactor oracle 8i compl... bayo Ojo
- Re: [Reactor For CF] Is Reactor oracle... Brian Kotek
- RE: [Reactor For CF] Is Reactor oracle... Bowden, Beth \(NIH/NIEHS\) [E]
- Re: [Reactor For CF] Is Reactor or... Brian Kotek
- RE: [Reactor For CF] Is Reactor oracle... Bowden, Beth \(NIH/NIEHS\) [E]

