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

@javax.persistence.Cacheable is never wired up

Description

In JPAOverriddenAnnotationReader.getCacheable:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 private Cacheable getCacheable(Element element, XMLContext.Default defaults){ if(element==null)return null; String attValue = element.attributeValue( "cacheable" ); if(attValue!=null){ AnnotationDescriptor ad = new AnnotationDescriptor( Cacheable.class ); ad.setValue( "value", Boolean.valueOf( attValue ) ); return AnnotationFactory.create( ad ); } if ( defaults.canUseJavaAnnotations() ) { return getJavaAnnotation( Cacheable.class ); } else { return null; } }

"element" is always null so it returns null immediately. It should return getJavaAnnotation( Cacheable.class ). The effect of this is that caching using @Cacheable doesn't work.


Andreas

Environment

None

Status

Assignee

Brett Meyer

Reporter

Andreas Joseph Krogh

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

4.1.7
4.1.8
4.1.9

Priority

Major