Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

import javax.persistence.criteria.Path;
import javax.persistence.metamodel.Attribute;
import javax.persistence.metamodel.ManagedType;

import lombok.Value;

@Value(staticConstructor = "of")
class RSQLJPAContext {

private Path<?> path;
private Attribute<?, ?> attribute;
Path<?> path;
Attribute<?, ?> attribute;
ManagedType<?> managedType;

}
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ RSQLJPAContext findPropertyPath(String propertyPath, Path startRoot) {
RSQLJPAContext context = findPropertyPath(mappedProperty, root);
root = context.getPath();
attribute = context.getAttribute();
classMetadata = context.getManagedType();
} else {
if (!hasPropertyName(mappedProperty, classMetadata)) {
if (Modifier.isAbstract(classMetadata.getJavaType().getModifiers())) {
Expand Down Expand Up @@ -153,7 +154,7 @@ RSQLJPAContext findPropertyPath(String propertyPath, Path startRoot) {
accessControl(type, attribute.getName());
}

return RSQLJPAContext.of(root, attribute);
return RSQLJPAContext.of(root, attribute, classMetadata);
}

private String getKeyJoin(Path<?> root, String mappedProperty) {
Expand Down
Loading