The Javadoc for JpaCompliance#isJpaCacheComplianceEnabled says:
* @implNote Effects include marking all secondary tables as non-optional.
* being that optional secondary tables can lead to entity cache being
* than updated.
But, the way it's used is the opposite (marks all secondary tables as
isNullableTable[j] = join.isOptional()
Even if a secondary table is explicitly mapped as non-optional using
when hibernate.jpa.compliance.caching=true, Hibernate assumes that
secondary tables are nullable. This causes an outer join to be used in
queries, when an inner join could be used instead.
The property was added by HHH-12282 , which also mentions that the
intention is to mark all tables as non-optional. HHH-12282 also has a
comment  that says:
"I think its safe enough here to simply say that compliance means we omit
the table-span check at all."
Should the determination of whether a table is nullable depends only
on org.hibernate.mapping.Join#isOptional, like the following?
isNullableTable[j] = join.isOptional();
JpaCompliance().isJpaCacheComplianceEnabled() == true would still skip