You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating tables and sequences in another schema and using PanachEntity as an ID generation strategy, always seeks sequence in the default database schema.
Caused by: org.hibernate.exception.SQLGrammarException: error executing SQL statement [ERROR: relation "test_seq" does not exist (42P01)] [select nextval('TEST_SEQ')]
To be able to use the sequence in another schema, I have to use PanacheEntityBase and set manually.
So, if I understand correctly, you'd like for id sequence generators to use the same schema as the table, unless specified explicitly?
If I get Panache out of the equation, that'd be:
@MappedSuperClasspublicclassTop {
@Id@GeneratedValuepublicLongid;
}
@Table(schema = "other")
@EntitypublicclassEntityextendsTop {
// here, implicitely, id generator should be in "other" schema
}
Describe the bug
Creating tables and sequences in another schema and using PanachEntity as an ID generation strategy, always seeks sequence in the default database schema.
To be able to use the sequence in another schema, I have to use PanacheEntityBase and set manually.
It can take from @table annotation.
Expected behavior
Sequences have the same scheme defined in @table
Actual behavior
Sequence always looks for the standard scheme
How to Reproduce?
Output of
uname -a
orver
Linux 6.11.6-200.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 16:09:34 UTC 2024 x86_64 GNU/Linux
Output of
java -version
openjdk version "21.0.5" 2024-10-15 OpenJDK Runtime Environment (Red_Hat-21.0.5.0.11-1) (build 21.0.5+11) OpenJDK 64-Bit Server VM (Red_Hat-21.0.5.0.11-1) (build 21.0.5+11, mixed mode, sharing)
Quarkus version or git rev
<quarkus.platform.version>3.15.1</quarkus.platform.version>⏎
Build tool (ie. output of
mvnw --version
orgradlew --version
)CLI - 3.16.3
Additional information
No response
The text was updated successfully, but these errors were encountered: