Skip to main content

[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?

On Tue, Aug 30, 2011 at 3:39 PM, Andrei Ilitchev <andrei.ilitchev@xxxxxxxxxx> wrote:
Eclipselink can do that, too. See

http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_(ELUG)
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


Back to the top