quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.64k stars 2.64k forks source link

Hibernate ORM multi-tenancy quickstart is outdated (and broken) #41759

Open yrodiere opened 3 months ago

yrodiere commented 3 months ago

Description

There are several problems with this quickstart: https://github.com/quarkusio/quarkus-quickstarts/tree/main/hibernate-orm-multi-tenancy-quickstart

  1. It's hard to use. It uses schema multi-tenancy by default, and requires weird profile setting to use database multitenancy instead. Even when using the default, one needs to start the DB manually with docker compose instead of just using dev services.
  2. Database multitenancy is simply broken. Following instructions will result in dev services starting up for the default database, and failing to bind to port 5432.

Implementation ideas

  1. Let's split examples between schema multitenancy in one project, and database multi tenancy in the other.
  2. Let's use dev services everywhere. I'm pretty sure we don't need docker-compose nowadays, and can set DB init scripts in dev services instead. See how it's done in Quarkus integration tests, maybe?
  3. Maybe, let's also provide a quickstart for discriminator multi-tenancy.
  4. Let's link to these quickstarts from the documentation.
quarkus-bot[bot] commented 3 months ago

/cc @gsmet (hibernate-orm)