Given a Base class {code:java} @Entity @Polymorphism(type = PolymorphismType.EXPLICIT) @Inheritance(strategy = InheritanceType.JOINED) public class BaseEntity { @Id @GeneratedValue public int id; } {code} and a Child {code:java} @Entity @Cache(usage = CacheConcurrencyStrategy.READ_ONLY) public class ChildEntity extends BaseEntity { }
{code} I expect ChildEntity to be able to be cached now using Hibernate 5.3.0, but {noformat} 2018-05-16 12:03:19 WARN EntityBinder:625 - HHH000482: @org.hibernate.annotations.Cache used on a non-root entity: ignored for null {noformat}
Test case: https://github.com/nikowitt/hibernate-test-case-templates/commit/7fd20e6b2a7e78ebb86563be4a35b7ce199076ac |
|