users@jpa-spec.java.net

[jpa-spec users] Re: [jsr338-experts] Re: JPA schema generation

From: Rainer Kwesi Schweigkoffer <kwesi_at_sap.com>
Date: Fri, 01 Jun 2012 09:59:45 +0200

Hi Linda, Mark,

> What I do not like is having Column names in any annotation!
> This is a really unpleasant thing in the @UniqueContraint annotation
> already! The reason I don't like this is that the name of the column
> can depend on lots of other things, like e.g. the database dictionary
> used. I know from my old DB/2 days that we only had 8 characters per
> table. Some Databases make no distinction between upper/lowercase,
> others do, etc. All this leads to getting different names when
> generating the schema for different databases. If you don't fixate
> the name via @Column then your @UniqueContraint column name strings
> ar basically almost ever broken.

actually I would expect the database indexes to very often depend on
the underlying database platform anyway, since the behaviour of
database optimizers pretty much varies from brand to brand. So, by the
way, I'd even more see them being expressed in the xml descriptors than
in annotations.

Unless, of course, we were to distinguish between logic index
definitions indicating frequent access to certain entity
attributes/attribute combinations, which then could be based on entity
attribute names and would be translated into database indexes by the
JPA provider, and database index definitions for tuning the application
on the underlying database platform, which would be based on column
names. However, I'd consider that a bit over-engineered.

Viele Grüße :-)
Rainer
---
Rainer Schweigkoffer               SAP AG Walldorf
Java Persistence                   TIP Core JI
Core Java Infrastructure           Dietmar-Hopp-Allee 16
Technology & Innovation Platform   D-69190 Walldorf
Building 3, I.3.14                 phone: +49 6227 7 45305
rainer.schweigkoffer_at_sap.com       fax:   +49 6227 7 821177
Sitz der Gesellschaft/Registered Office: Walldorf, Germany
Vorstand/SAP Executive Board: Werner Brandt, Bill
McDermott (Co-CEO), Gerhard Oswald, Vishal Sikka,
Jim Hagemann Snabe (Co-CEO)
Vorsitzender des Aufsichtsrats/Chairperson of the SAP
Supervisory
Board: Hasso Plattner
Registergericht/Commercial Register Mannheim No HRB 350269
Diese E-Mail kann Betriebs- oder Geschaeftsgeheimnisse
oder sonstige vertrauliche Informationen enthalten.
Sollten Sie diese E-Mail irrtuemlich erhalten haben, ist
Ihnen eine Verwertung des Inhalts, eine Vervielfaeltigung
oder Weitergabe der E-Mail ausdruecklich untersagt. Bitte
benachrichtigen Sie uns und vernichten Sie die empfangene
E-Mail. Vielen Dank.
This e-mail may contain trade secrets or privileged,
undisclosed, or otherwise confidential information. If you
have received this e-mail in error, you are hereby
notified that any review, copying, or distribution of it
is strictly prohibited. Please inform us immediately and
destroy the original transmittal. Thank you for your
cooperation.