-
In Springbootapplication.yml spring:
jpa:
properties:
hibernate:
multiTenancy: true
tenant_identifier_resolver: com.example.config.TenantResolver TenantResolver.java public interface CurrentTenantIdentifierResolver {
// set tenant value
String resolveCurrentTenantIdentifier();
// true will query all tenant data
default boolean isRoot(String tenantId) {
return false;
}
} But in Quarkus 3.xI can not find how to query ignore tenant like application.properties quarkus.hibernate-orm.multitenant=DISCRIMINATOR CustomTenantResolver.java @PersistenceUnitExtension
@RequestScoped
public class CustomTenantResolver implements TenantResolver {
// what is this ?
@Override
public String getDefaultTenantId() {
return "0";
}
@Override
public String resolveTenantId() {
return Optional.ofNullable(TenantUtil.getTenantId()).map(Serializable::toString).orElse(null);
}
} |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
/cc @Sanne (hibernate-orm), @gsmet (hibernate-orm), @yrodiere (hibernate-orm) |
Beta Was this translation helpful? Give feedback.
-
As far as I can tell this is simply a missing feature. If you need it, I'd suggest filing a feature request, and ideally a pull request that:
|
Beta Was this translation helpful? Give feedback.
-
see pulls#35492 |
Beta Was this translation helpful? Give feedback.
see pulls#35492