use getAllMembers() when resolving Jakarta Data paths
This commit is contained in:
parent
2c2413a773
commit
a12d589e77
|
@ -1916,14 +1916,13 @@ public class AnnotationMetaEntity extends AnnotationMeta {
|
||||||
}
|
}
|
||||||
|
|
||||||
private @Nullable Element memberMatchingPath(TypeElement entityType, String path) {
|
private @Nullable Element memberMatchingPath(TypeElement entityType, String path) {
|
||||||
final StringTokenizer tokens = new StringTokenizer( path, "." );
|
return memberMatchingPath( entityType, new StringTokenizer(path, ".") );
|
||||||
return memberMatchingPath( entityType, tokens );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private @Nullable Element memberMatchingPath(TypeElement entityType, StringTokenizer tokens) {
|
private @Nullable Element memberMatchingPath(TypeElement entityType, StringTokenizer tokens) {
|
||||||
final AccessType accessType = getAccessType(entityType);
|
final AccessType accessType = getAccessType(entityType);
|
||||||
final String nextToken = tokens.nextToken();
|
final String nextToken = tokens.nextToken();
|
||||||
for ( Element member : entityType.getEnclosedElements() ) {
|
for ( Element member : context.getElementUtils().getAllMembers(entityType) ) {
|
||||||
if ( "#id".equals(nextToken) && hasAnnotation( member, ID) ) {
|
if ( "#id".equals(nextToken) && hasAnnotation( member, ID) ) {
|
||||||
return member;
|
return member;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue