Hi Everyone!

My EOModel is using ERPrototypes with EOJDBCOraclePrototypes selected.
I have a column set to varcharLarge and when I generate the migration I get:
        ...
        personTable.newStringColumn("longName", false);
        ...

That statement results in SQL which is invalid in Oracle:
(varchar2 with column width 10000000 which is somewhat beyond the 4000 limit.)

I think that it code should be something like:
        ...
        personTable.newClobColumn("longName", false);
        ...

which defines column as CLOB.  I propose:
Marks-MacBook:woproject mark$ svn diff 
wolips/core/plugins/org.objectstyle.wolips.eomodeler.core/templates/EntityMigration0.java
Index: 
wolips/core/plugins/org.objectstyle.wolips.eomodeler.core/templates/EntityMigration0.java
===================================================================
--- 
wolips/core/plugins/org.objectstyle.wolips.eomodeler.core/templates/EntityMigration0.java
   (revision 6031)
+++ 
wolips/core/plugins/org.objectstyle.wolips.eomodeler.core/templates/EntityMigration0.java
   (working copy)
@@ -8,6 +8,8 @@
 #if ($attribute.sqlGenerationCreateProperty)
 #if ($attribute.prototype.name == "longText")
                
${migrationTableName}.newLargeStringColumn("${attribute.columnName}", 
${attribute.sqlGenerationAllowsNull});
+#elseif ($attribute.javaClassName == "String" && $attribute.externalType == 
"CLOB")
+               ${migrationTableName}.newClobColumn("${attribute.columnName}", 
${attribute.sqlGenerationAllowsNull});
 #elseif ($attribute.javaClassName == "String" && $attribute.width)
                
${migrationTableName}.newStringColumn("${attribute.columnName}", 
${attribute.width}, ${attribute.sqlGenerationAllowsNull});
 #elseif ($attribute.javaClassName == "String")

I've looked about the other prototypes and it seems that CLOB isn't used very 
often so I think that this will have minimal impact but I wanted to check with 
the community before I submitted the patch.  What do folks think?

Thanks!
Mark
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to