You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Anthony Alba <as...@gmail.com> on 2020/11/17 05:25:01 UTC
OpenJPA+H2: accidentally finds table USERS from INFORMATION_SCHEMA
instead of PUBLIC
I am using an Entity called User, with the table "Users".
Unfortunately, without DDL scripts and using metadata only DDL in
persistence.xml
for drop-and-create, OpenJPA is finding the USERS table from the
INFORMATION_SCHEMA,
instead of the PUBLIC schema (where the table does not yet exist).
As a result it does not send the "CREATE TABLE" SQL and tries to alter
the non-existent
USERS table with "ALTER TABLE" (since SQL statements target the H2
PUBLIC schema).
Hibernate: it does not detect any USERS table in PUBLIC schema and so sends
"CREATE TABLE" DDL.
Is this a "bug" ?
Cheers
Anthony