mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-30 21:08:30 +08:00
Revert PathMetadataFactory change
This commit is contained in:
parent
eb60a83372
commit
e90c2f48a6
@ -61,21 +61,10 @@ public final class PathMetadataFactory {
|
||||
* @param delegate
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
public static <T> PathMetadata<T> forDelegate(Path<T> delegate) {
|
||||
return new PathMetadata<T>(delegate, delegate, PathType.DELEGATE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new PathMetadata for delegate access
|
||||
*
|
||||
* @param delegate
|
||||
* @return
|
||||
*/
|
||||
public static <T> PathMetadata<T> forDelegate(Expression<T> delegate) {
|
||||
return new PathMetadata<T>(null, delegate, PathType.DELEGATE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new PathMetadata for indexed list access
|
||||
*
|
||||
|
||||
@ -73,7 +73,7 @@ public final class ValidatingVisitor implements Visitor<Set<Expression<?>>, Set<
|
||||
|
||||
@Override
|
||||
public Set<Expression<?>> visit(Path<?> expr, Set<Expression<?>> known) {
|
||||
if (!known.contains(expr.getRoot()) && expr.getMetadata().getPathType() != PathType.DELEGATE) {
|
||||
if (!known.contains(expr.getRoot())) {
|
||||
throw new IllegalArgumentException(String.format(errorTemplate, expr.getRoot()));
|
||||
}
|
||||
return known;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user