Historically Hibernate would invalid the cache entries for an entity defined with multiple secondary tables (unless that entity were versioned) rather than write data for update and/or insert. This setting would allow disabling that. The reason being that the JPA 2.2 TCK started testing the provider's caching configuration by actually persisting data via EntityManager and then asking the {{javax.persistence.Cache}} implementation (Hibernate) whether that entity is cached or not. Those tests "just happen" to use entities defined with {{@javax
h2 . persistence.secondaryTable}} - which is funny because the secondary tables aren't even used. Changes
Would probably be better to decide whether to disable that check or not # Should limit the checks based on the of *optional* secondary tables rather than to just optional ones. If all secondary tables are non-optional then this is less of a worry . Actually we can probably just disable caching for such # Add setting to allow marking all join tables as non-optional ( sans this setting) in such cases {{hibernate . This could miss data already in the cache (infinispan cache loader, eg jpa.compliance.caching}} ). |
|