• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: EntityModeler - ERPrototypes - Oracle - generated code doesn't handle CLOB column
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EntityModeler - ERPrototypes - Oracle - generated code doesn't handle CLOB column


  • Subject: Re: EntityModeler - ERPrototypes - Oracle - generated code doesn't handle CLOB column
  • From: Mike Schrag <email@hidden>
  • Date: Wed, 17 Feb 2010 19:25:18 -0500

Hmm.... varcharLarge is a weird one. It seems like maybe it should be calling newLargeStringColumn and that migration for Oracle should use a CLOB. It seems weird that Oracle's definition for longText is BLOB and not CLOB, too. The relationship between longText and varcharLarge is unclear to me. I always use varcharLarge, but I never noticed that it wasn't calling newLargeStringColumn.

On Feb 17, 2010, at 6:47 PM, Mark Ritchie wrote:

> 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

  • Follow-Ups:
    • Re: EntityModeler - ERPrototypes - Oracle - generated code doesn't handle CLOB column
      • From: Mark Ritchie <email@hidden>
References: 
 >EntityModeler - ERPrototypes - Oracle - generated code doesn't handle CLOB column (From: Mark Ritchie <email@hidden>)

  • Prev by Date: EntityModeler - ERPrototypes - Oracle - generated code doesn't handle CLOB column
  • Next by Date: Re: EntityModeler - ERPrototypes - Oracle - generated code doesn't handle CLOB column
  • Previous by thread: EntityModeler - ERPrototypes - Oracle - generated code doesn't handle CLOB column
  • Next by thread: Re: EntityModeler - ERPrototypes - Oracle - generated code doesn't handle CLOB column
  • Index(es):
    • Date
    • Thread