[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-dev] bug 340329 - table creation prefix
|
Hi Tom,
yes, a "prefix" as propsed in the patch would substitute "CREATE TABLE". I agree that "prefix" does not appear to be the right terminology. "createTableStatement" isn't either as its only the first part of the statement. Maybe "createTableKeywords" would be better or "createTableStatementHeader".
It is an SAP-specific future feature we would like leverage, which allows to control some storage parameters of a table. The actual Syntax has the structure "CREATE <modifier> TABLE". Hence specifying the <modifier> as an "infix" would also be OK.
Still, I am afraid that this (prefix/suffix) opens a small can of worms and it might be cleaner to delegate writeCreateTable to the platform as scetched out below.
-Adrian
Adrian Görler
SAP AG
Pflichtangaben/Mandatory Disclosure Statements:
http://www.sap.com/company/legal/impressum.epx
-----Original Message-----
From: eclipselink-dev-bounces@xxxxxxxxxxx [mailto:eclipselink-dev-bounces@xxxxxxxxxxx] On Behalf Of Tom Ware
Sent: Montag, 28. März 2011 16:55
To: Dev mailing list for Eclipse Persistence Services
Cc: Xiang, Xu; Singer, Reiner
Subject: Re: [eclipselink-dev] bug 340329 - table creation prefix
What would a typical prefix be? (is it really a prefix, or a replacement for
"CREATE TABLE"? Is PREFIX the right terminology?)
When would someone choose to use a prefix? Is this a MAXDB specific thing?
-Tom
Goerler, Adrian wrote:
> Hi Chris, others,
>
>
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=340329
>
>
>
> we got the requirement to allow overriding the CREATE TABLE keywords in
> DDL in a table-specific way to leverage special database features. Xu
> has proposed to introduce a creation-prefix attribute to the
> table-mappings of eclipselink-orm.xml - analogously to
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=214519. Please find
> attached a revised proposal including test for this enhancement.
>
>
>
> I you are OK with this feature, I would go ahead and check it in.
>
>
>
> -Adrian
>
>
>
> PS.
>
>
>
> Alternatively, I could consider to specify additional requirements on
> the DDL using @Properties/@Property annotations. Then, one could add
> hese properties to the TableDefinition, redirect rendering of CREATE
> TABLE statements to the DatabasePlatform and render the statement in a
> database-vendor specific way according to the properties recognized by
> the vendor.
>
>
>
> E.g.:
>
>
>
>
>
> @Table(name="MY_TABLE")
>
> @Property("mysql.jdbc.engine", "InnoDB")
>
> @Entity
>
> Public class MyEntity
>
>
>
> This, however, would obsolete the creation-suffix just introduced in 2.2
> ;-).
>
>
>
>
>
>
>
> *Adrian Görler
> **SAP AG
>
> *Pflichtangaben/Mandatory Disclosure Statements:
> http://www.sap.com/company/legal/impressum.epx
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> eclipselink-dev mailing list
> eclipselink-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-dev
_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev