We're updating the issue view to help you get more done. 

Any level caching on joined inheritance does not work

Description

Given a Base class

1 2 3 4 5 6 7 8 @Entity @Polymorphism(type = PolymorphismType.EXPLICIT) @Inheritance(strategy = InheritanceType.JOINED) public class BaseEntity { @Id @GeneratedValue public int id; }

and a Child

1 2 3 4 @Entity @Cache(usage = CacheConcurrencyStrategy.READ_ONLY) public class ChildEntity extends BaseEntity { }

I expect ChildEntity to be able to be cached now using Hibernate 5.3.0, but

1 2 2018-05-16 12:03:19 WARN EntityBinder:625 - HHH000482: @org.hibernate.annotations.Cache used on a non-root entity: ignored for null

Test case: https://github.com/nikowitt/hibernate-test-case-templates/blob/HHH-12588

Environment

None

Status

Assignee

Unassigned

Reporter

Niko Wittenbeck

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

5.3.0.Final

Priority

Major