thank you, i am glad your conclusion is that i worry too much :)
can you explain, or speculate why OpenJPA took such a different approach? i'm even less informed on OpenJPA, but as far as i can tell they have their own XML file that defines the schema in a DB-neutral manner, and a tool to process that XML schema file. i don't get it. isn't all of the necessary data in annotations?
maybe this is a question for the OpenJPA alias though :)
Wonseok Kim <guruwons_at_gmail.com> wrote: 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 at Yahoo! Autos.
---------------------------------
We won't tell. Get more on shows you hate to love
(and love to hate): Yahoo! TV's Guilty Pleasures list.