Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PanacheEntity Creating Tables Failing With H2 #16675

Closed
rosariop opened this issue Apr 21, 2021 · 2 comments
Closed

PanacheEntity Creating Tables Failing With H2 #16675

rosariop opened this issue Apr 21, 2021 · 2 comments
Labels
area/panache kind/bug Something isn't working

Comments

@rosariop
Copy link

Describe the bug

When building a database structure using PanacheEntity, errors are thrown during DDL exection.
Hibernate failes to create tables when using JavaX persitence relation (e.g. MayToOne) on the given table-type.

Expected behavior

I'd expect, that hibernate generates the database tables with all given links between them.

Actual behavior

Error executing DDL creating tables
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "create table Order (id bigint not null, orderTimestamp timestamp, shipped boolean not null, customer_id bigint, primary key (id))" via JDBC Statement

To Reproduce

https://github.com/rosariop/PanacheRelationBugDemo

Steps to reproduce the behavior:

  1. ./mvnw compile quarkus:dev

Configuration

quarkus.hibernate-orm.database.generation=create
quarkus.datasource.db-kind=h2
quarkus.datasource.username=admin
quarkus.datasource.password=admin
quarkus.datasource.jdbc.url=jdbc:h2:mem:testdb
quarkus.datasource.jdbc.max-size=13

Environment (please complete the following information):

Using Ubuntu 20.04, OpenJDK 11, Maven 3.6.3

Output of uname -a or ver

Linux ubuntuvm 5.8.0-50-generic #56~20.04.1-Ubuntu SMP Mon Apr 12 21:46:35 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version "11.0.10" 2021-01-19
OpenJDK Runtime Environment (build 11.0.10+9-Ubuntu-0ubuntu1.20.04)
OpenJDK 64-Bit Server VM (build 11.0.10+9-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)

Quarkus version or git rev

1.13.2.Final

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.6.3

@rosariop rosariop added the kind/bug Something isn't working label Apr 21, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Apr 21, 2021

/cc @FroMage, @loicmathieu

@rosariop
Copy link
Author

It's not a bug. ORDER is a keyword in SQL so the error comes from my Table beeing badly named.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/panache kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant