Skip to content

quarkus.hibernate-orm.database.default-schema should not override the schema defined by the multi-tenancy strategy #19175

Open

Description

Description

When using the SCHEMA multi-tenancy strategy in Hibernate ORM, the database schema to use for each session is supposedly determined by the tenant identifier.

However, if quarkus.hibernate-orm.database.default-schema is set, that "default" schema becomes the mandatory schema everywhere, and overrides the schema inferred from the tenant identifier.

It should not.

See #15602 (comment)

Implementation ideas

  • If there are cases where no tenant ID is defined, then we should only use the default schema in those cases.
  • If there aren't such cases, we should forbid using quarkus.hibernate-orm.database.default-schema when schema-based multitenancy is enabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions