parent
866585d4b6
commit
7b189d0200
|
@ -1923,7 +1923,7 @@ public class AnnotationMetaEntity extends AnnotationMeta {
|
||||||
final AccessType accessType = getAccessType(entityType);
|
final AccessType accessType = getAccessType(entityType);
|
||||||
final String nextToken = tokens.nextToken();
|
final String nextToken = tokens.nextToken();
|
||||||
for ( Element member : context.getElementUtils().getAllMembers(entityType) ) {
|
for ( Element member : context.getElementUtils().getAllMembers(entityType) ) {
|
||||||
if ( "#id".equals(nextToken) && hasAnnotation( member, ID) ) {
|
if ( isIdRef(nextToken) && hasAnnotation( member, ID) ) {
|
||||||
return member;
|
return member;
|
||||||
}
|
}
|
||||||
final Element match =
|
final Element match =
|
||||||
|
@ -1935,6 +1935,11 @@ public class AnnotationMetaEntity extends AnnotationMeta {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static boolean isIdRef(String nextToken) {
|
||||||
|
return "#id".equals(nextToken) // for Jakarta Data M4 release
|
||||||
|
|| "id(this)".equals(nextToken); // post M4
|
||||||
|
}
|
||||||
|
|
||||||
private @Nullable Element memberMatchingPath(
|
private @Nullable Element memberMatchingPath(
|
||||||
TypeElement entityType,
|
TypeElement entityType,
|
||||||
Element candidate,
|
Element candidate,
|
||||||
|
|
Loading…
Reference in New Issue