openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <>
Subject Re: OPENJPA_SEQUENCE_TABLE: needed even with IDENTITY columns?
Date Mon, 20 Apr 2009 21:18:13 GMT

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
public class PObject {
	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            
OpenJPA PMC Member/Committer
JPA Expert Group Member
View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message