[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] TableGenerator question: is the provider responsible for initializing rows?
|
If you use "eclipselink.ddl-generation" with "create-tables" then
pre-existing tables will be kept and sequence table will be populated.
On 8/30/2011 3:46 PM, Laird Nelson wrote:
On Tue, Aug 30, 2011 at 3:39 PM, Andrei Ilitchev
<andrei.ilitchev@xxxxxxxxxx <mailto:andrei.ilitchev@xxxxxxxxxx>> wrote:
Eclipselink can do that, too. See
http://wiki.eclipse.org/Using___EclipseLink_JPA_Extensions_(__ELUG)
<http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_%28ELUG%29>
Using EclipseLink JPA Extensions for Schema Generation
No, it can't, if by that link you were attempting to point me at
eclipselink.ddl-generation and its related properties.
I'm very much aware of the fact that EclipseLink can generate /entire
schemas/ automatically (eclipselink.ddl-generation etc.) That's /not/
what I want. I'm creating my tables already by hand for many reasons.
But I'm not, at the moment, inserting rows into my (hand-created)
sequence table that I refer to from my @TableGenerators.
So, again, my sequence table is already created, as are the tables for
my entities. Some of them have default data in them. I have never
inserted explicit rows, however, into my sequence table, largely because
OpenJPA and Hibernate do that initial insertion for me; I just assumed
EclipseLink did too. But now I think I'm discovering that no, it doesn't.
Again, Hibernate and OpenJPA both allow you to simply create an empty
sequence table, refer to it with @TableGenerator annotations, and they
take care of seeding it with initial values. I had been under the
impression that this was specification-mandated behavior, but this seems
to be a gray area.
Best,
Laird
--
http://about.me/lairdnelson
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users