OpenJPA uses OPENJPA_SEQUENCE_TABLE to generate primary keys for entities
that use datastore identity or application identity with auto-generation
strategy. The table is created automatically when persistence.xml
configuration specifies to build the schema.
<property name="openjpa.jdbc.SynchrnozieMappings" value="buildSchema"/>

The other option is to create the table directly via DDL

CREATE TABLE openjpa_sequence_table (ID tinyint(4) NOT NULL, SEQUENCE_VALUE
bigint(20) default NULL, PRIMARY KEY  (ID))



Patrick T wrote:
> 
> Hello Everyone,
> 
> I have an entity that doesn't have any relationships and when I try to
> create an entry, I get the following error message. I looked at my
> database and I do not seem to have this table. Is this table supposed to
> be autogenerated when using openjpa? I'm using WAS 6.1 with ejb3 pack. 
> 
> Attempt to update the sequence table "OPENJPA_SEQUENCE_TABLE" failed.  The
> sequence table is typically created when you run the mappingtool's refresh
> action on any datastore identity class. If you have not run the
> mappingtool but want to create the sequence table, run:
> java org.apache.openjpa.jdbc.kernel.TableJDBCSeq -action addSQLCA
> OUTPUT[Errp=SQLNQ72D, Errd=-2145779603, 0, 0, 0, -100, 0]
> 

-- 
View this message in context: 
http://www.nabble.com/OPENJPA_SEQUENCE_TABLE-tp14997653p15003354.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to