Skip to content

Update to support multi-tenant DB connections

Tenant connection is chosen by setting the persistence unit in the query. While something automated could be used to do reflection-based lookups, it would be unreliable. An object can belong to multiple persistence units, meaning that some sort of logic would need to be added to manage which is "best-match" and allow for overrides. Sometimes simple is best.

Logic was implemented in a way that would not impact existing default connections. This makes use of the Quarkus default label in the code, along with an available override when using only named units.

Merge request reports