On 17/Feb/2010, at 4:25 PM, Mike Schrag wrote:
> Hmm.... varcharLarge is a weird one. It seems like maybe it should be calling newLargeStringColumn and that migration for Oracle should use a CLOB.
I'm ok with that! That I can make work! ;-)
> It seems weird that Oracle's definition for longText is BLOB and not CLOB, too.
one problem at a time! ;-)
> The relationship between longText and varcharLarge is unclear to me. I always use varcharLarge, but I never noticed that it wasn't calling newLargeStringColumn.
Not sure which version of Oracle you were using however with 10g, that fails! ;-)
And I would vote that for Oracle, longText and varcharLarge are both CLOB.
(You'll notice that I'm completely ignoring the NCLOB questions... I'll leave that for another time! ;-)
I've updated EntityMigration0.java by adding:
+#elseif ($attribute.javaClassName == "String" && $attribute.externalType == "CLOB")
+ ${migrationTableName}.newLargeStringColumn("${attribute.columnName}", ${attribute.sqlGenerationAllowsNull});
and I've updated ERXSQLHelper$OracleSQLHelper by adding:
+ /**
+ * For Oracle, it seems the right thing to do for varcharLarge is to use a CLOB column.
+ * CLOB is limited to 8TB where as VARCHAR is limited to 4000 bytes.
+ */
+ ..verride
+ public int varcharLargeJDBCType() {
+ return Types.CLOB;
+ }
And that combination works for me!!
Any other thoughts from folks on this or can I put together the patch?
Thanks!
Mark.
This archive was generated by hypermail 2.0.0 : Wed Feb 17 2010 - 20:21:41 EST