blaze-persistence
blaze-persistence copied to clipboard
Clarification on Join Behavior with @SoftDelete in Paginated Criteria Queries
I would like to seek clarification regarding the behavior of implicit joins when using Hibernate's @SoftDelete annotation in combination with a @ManyToOne relationship, particularly when the related entity is soft-deleted.
By default, implicit joins are usually generated as JOIN. This behavior can typically be adjusted using Blaze Persistence's joinDefault configuration. However, when the query involves pagination, the configured join type does not appear to take effect. Even when explicitly specifying the join type using joinOn, the generated query consistently includes a default JOIN to the soft-deleted entity.
Is this behavior expected, or is there an alternative approach to ensure the desired join type is respected in paginated queries?
Version:
Blaze-Persistence: 1.6.14
JPA-Provider: Hibernate 6.6.2.Final
DBMS: PostgreSQL 16
Application: Spring Boot 3.4.0