EntityModeler - ERPrototypes - Oracle - generated code doesn't handle CLOB column
EntityModeler - ERPrototypes - Oracle - generated code doesn't handle CLOB column
- Subject: EntityModeler - ERPrototypes - Oracle - generated code doesn't handle CLOB column
- From: Mark Ritchie <email@hidden>
- Date: Wed, 17 Feb 2010 15:47:32 -0800
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden