Hello,

I'm trying to add Oracle 9i's XMLType support in my Torque scripts.

XMLType is in its most basic form a glorified CLOB, with associated API to manipulate/query the XML document.

I'm not doing anything complex, merely generating a set of SQL scripts, along with PL/SQL packages etc..
I don't intend to generate an ORM layer or anything of the kind.



I'm not so familiar with Torque (or its underlying libs), and I simply updated the following files :


- database.dtd to add XMLTYPE

- db.props, dbJavaType.props, dbSizes.props, dbSQLTypes.props to add XMLTYPE lines very similar to CLOB ones
e.g. XMLTYPE = XMLTYPE (similar to CLOB = CLOB really)


- columns.vm to look like this :

#foreach ($col in $table.Columns)
#set ( $type = $dbprops.get($col.Type) )
#if ( $type == "XMLTYPE" ) #set ( $xmlstorage = "STORE AS CLOB" ) #end
#set ( $size = $col.printSize() )
#set ( $default = $col.DefaultSetting )
#set ( $nullString = $strings.select($col.isNotNull(), $dbprops.get("NOTNULL"),"") )
#set ( $entry = "$col.Name $type $!xmlstorage $size $default $nullString," )
$strings.sub($strings.collapseSpaces($entry)," ,",",")
#end



However, when running ANT, I get the following entries in the Velocity.log :


Wed Jul 09 18:27:46 CEST 2003 [error] Method get threw exception for reference $dbprops in template bc4j/columns.vm at [2,20]
Wed Jul 09 18:27:46 CEST 2003 [error] Method parse threw exception for reference $generator in template bc4j/table.vm at [9,16]
Wed Jul 09 18:27:46 CEST 2003 [error] Method parse threw exception for reference $generator in template bc4j/Control.vm at [35,9]


So basically the db.props file might be invalid. But I'm suspecting that the problem is in the underlying libraries. It's not a problem of parsing the props or vm files, because if I remove my schema.xml's column type to CLOB, it generates fine.

Anybody with a Torque developer take on this ?

Thanks

Brice



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to