I should briefly mention that I had the same problem using the MySql
database.
I'm sure I'm not using the SEQUENCE table because I manually created my
database tables and I was just migrating to using the schema generator.
In my case it was tracked down to using an @EmbeddedId in the model class
@EmbeddedId
private FacilityIdIntegerCompositePk facilityDemographicPk;
the @Embeddable class contained 2 Integers with no annotations.
private Integer integratorFacilityId = null;
private Integer caisiItemId = null;
I just ignored it as it wasn't creating any problems for me. My
application still runs fine and there's not a single row in the sequence
table.
On Mon, Apr 20, 2009 at 02:18:13PM -0700, Pinaki Poddar wrote:
>
> 1. To verify that OPENJPA_SEQUENCE_TABLE is not getting created by another
> entity, can you run the application with a single simple class such as
> @Entity
> public class PObject {
> @Id
> @GeneratedValue(strategy=GenerationType.IDENTITY)
> private long id;
>
> public long getId() {
> return id;
> }
>
> }
>
> 2. What is the resultant schema for PObject on H2 database?
>
>
> ljnelson wrote:
> >
> > Hello. I am using the H2 database for some simple unit tests, with
> > OpenJPA sitting on top of it.
> >
> > I am wondering how to get OpenJPA to stop trying to create or look for the
> > OPENJPA_SEQUENCE_TABLE, particularly since nothing in my entity model
> > requires it (I explicitly use the @GenerationType of IDENTITY, which I
> > took it was supposed to use the native auto-incrementing ability of the
> > database, if there is one (which there is in H2).
> >
> > Could someone tell me either how to instruct OpenJPA to basically insert
> > NULL into the primary key column instead of trying to insert a value it
> > thinks it can get from the non-existent OPENJPA_SEQUENCE_TABLE? If I
> > wanted to use a table, I would have used @GenerationType.TABLE, not
> > @GenerationType.IDENTITY.
> >
> > Thanks very much!
> >
> > Best,
> > Laird
> >
>
>
> -----
> Pinaki Poddar http://ppoddar.blogspot.com/
>
> http://www.linkedin.com/in/pinakipoddar
> OpenJPA PMC Member/Committer
> JPA Expert Group Member
> --
> View this message in context:
> http://n2.nabble.com/OPENJPA_SEQUENCE_TABLE%3A-needed-even-with-IDENTITY-columns--tp2657337p2666410.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>
--
Ted Leung
[email protected]
I am what what the world has taught me to be.