persistence@glassfish.java.net

Re: toplink schema generation - for development only?

From: Wonseok Kim <guruwons_at_gmail.com>
Date: Sat, 17 Mar 2007 01:48:42 +0900

Hi Jeff,

You seem to worry too much. :-)

The table and column name mapping is defined in the spec, hence it will not
change as implementation version goes up.

The generated column type could be different depending on database, so the
implementation is responsible for this. But even if the type is a little
different(e.g. VARCHAR or TEXT), the runtime does not care much for this.
You may use Hibernate even after the table is generated by TopLink. DDL
Generation and runtime is separated layer. You can create tables on you own
by customizing the generated schema files. It means the runtime does not
depend on the DDL generation scheme.

Of course there are some part where implementation can decide differently
like @GeneratedValue if there is no specific configuration (default case).
In this case TopLink is using table generator and the table name is
"SEQUENCE" (it's documented). This may be different in other implementation.
But It's documented and so I think it would not change easily.

Accordingly I think DDL generation feature is not toy but very useful
feature in real environment.

-Wonseok

On 3/17/07, jeff <jeffrey.blattman_at_yahoo.com> wrote:
>
> schema generation, IMHO, is a great thing.
>
> 1. for the N different DBs i support, i don't have to design the schema by
> hand
> 2. it seriously cuts down on the number of annotations i need, for calling
> out tables and columns, etc.
>
> however, a potential problem w/ this occurred to me. say my product is
> running along w/ the toplink 2.0 and now i want to upgrade to toplink
> 2.next. will this work? for example, i let toplink create the table with
> whatever name it wants. now toplink.next maybe changes to scheme that it
> uses to create table names, so it assumes a different name, and can't find
> the original.
>
> so i guess my question is ... is toplink's schema generation a production
> feature? or is it just a development tool? my production feature, i mean
> that a best effort is made to not break things between toplink releases.
>
> thoughts?
> thanks!
>
>
> ------------------------------
> Don't pick lemons.
> See all the new 2007 cars<http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE0OGRsc3F2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3Y2Fycw-->at Yahoo!
> Autos.<http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE0OGRsc3F2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3Y2Fycw-->
>
>