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

Hibernate Inheritance not persisting to database table #42081

Closed
shohruh-genius opened this issue Jul 23, 2024 · 5 comments
Closed

Hibernate Inheritance not persisting to database table #42081

shohruh-genius opened this issue Jul 23, 2024 · 5 comments
Labels
area/hibernate-reactive env/windows Impacts Windows machines kind/bug Something isn't working triage/needs-reproducer We are waiting for a reproducer.

Comments

@shohruh-genius
Copy link

Describe the bug

@Entity
@Table(name = "test_parent")
@Inheritance(strategy = InheritanceType.JOINED)
class Parent(var name: String) : PanacheEntity()
@Entity
class Child(name: String) : Parent(name)
@GraphQLApi
@Name("test_inheritance")
class TestInheritanceGraphQLResource {
    @Mutation
    fun create(name: String) = withTransaction {
        Child(name).persist<Child>().awaitSuspending()
    }
}

database is postgresql 16

Expected behavior

It should save the data to the table when endpoint is called.

Actual behavior

It is not working on aws ecs which runs on ubuntu-latest

(p.s. it works on local devices which run on macos 15 and windows 11)

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

21

Quarkus version or git rev

3.12.3

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

Gradle 8.8

Additional information

No response

@shohruh-genius shohruh-genius added the kind/bug Something isn't working label Jul 23, 2024
@quarkus-bot quarkus-bot bot added area/hibernate-orm Hibernate ORM area/persistence OBSOLETE, DO NOT USE env/windows Impacts Windows machines labels Jul 23, 2024
@quarkus-bot
Copy link

quarkus-bot bot commented Jul 23, 2024

/cc @gsmet (hibernate-orm), @yrodiere (hibernate-orm)

@yrodiere
Copy link
Member

Hey,

Thanks for reporting.

To clarify, you're using Hibernate Reactive, right? Hard to say without the imports, but I guess awaitSuspending() gives us a clue.

As you can guess, other users -- and our own test suite -- are dealing with inheritance fine, so the issue must involve some specifics of your setup.

Please provide a reproducer (a simple Quarkus project demonstrating the issue). Preferably in Java since Kotlin is not my forte.

@yrodiere yrodiere added area/hibernate-reactive triage/needs-reproducer We are waiting for a reproducer. and removed area/hibernate-orm Hibernate ORM labels Jul 23, 2024
@shohruh-genius
Copy link
Author

found the issue
when I added following property
quarkus.hibernate-orm.jdbc.statement-batch-size=20
Hibernate @Inheritance didn't work, it didn't persist the data

@yrodiere
Copy link
Member

Thanks, but this is not normal behavior. The JDBC statement batch size shouldn't even interact with @Inheritance in any way.

Please provide a reproducer?

@yrodiere yrodiere removed the area/persistence OBSOLETE, DO NOT USE label Aug 14, 2024
@geoand
Copy link
Contributor

geoand commented Sep 5, 2024

Closing for a lack of a reproducer.

If one becomes available, please add it and we can reopen the issue.

@geoand geoand closed this as not planned Won't fix, can't repro, duplicate, stale Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/hibernate-reactive env/windows Impacts Windows machines kind/bug Something isn't working triage/needs-reproducer We are waiting for a reproducer.
Projects
None yet
Development

No branches or pull requests

3 participants