diff --git a/querydsl-collections/src/main/java/com/mysema/query/collections/alias/PropertyAccessInvocationHandler.java b/querydsl-collections/src/main/java/com/mysema/query/collections/alias/PropertyAccessInvocationHandler.java index b2cac68d8..e8d3e5676 100644 --- a/querydsl-collections/src/main/java/com/mysema/query/collections/alias/PropertyAccessInvocationHandler.java +++ b/querydsl-collections/src/main/java/com/mysema/query/collections/alias/PropertyAccessInvocationHandler.java @@ -100,10 +100,6 @@ class PropertyAccessInvocationHandler implements MethodInterceptor{ } aliasFactory.setCurrent(propToExpr.get(ptyName)); - }else if (isEquals(method)){ - rv = methodProxy.invokeSuper(proxy, args); - aliasFactory.setCurrent(((Expr)parent).eq(args[0])); - }else if (isContains(method)){ rv = false; aliasFactory.setCurrent(Grammar.in(args[0], (CollectionType)parent)); @@ -118,7 +114,8 @@ class PropertyAccessInvocationHandler implements MethodInterceptor{ valueType = (Class) args[0]; }else{ - rv = methodProxy.invokeSuper(proxy, args); +// rv = methodProxy.invokeSuper(proxy, args); + throw new IllegalArgumentException("Invocation of " + method.getName() + " not supported"); } return rv; } @@ -134,12 +131,6 @@ class PropertyAccessInvocationHandler implements MethodInterceptor{ && method.getParameterTypes().length == 1 && method.getParameterTypes()[0].equals(int.class); } - - private boolean isEquals(Method method){ - return method.getName().equals("equals") - && method.getReturnType().equals(boolean.class) - && method.getParameterTypes().length == 1; - } private boolean isGetter(Method method){ return method.getParameterTypes().length == 0 diff --git a/querydsl-collections/src/test/java/com/mysema/query/collections/MiniApiTest.java b/querydsl-collections/src/test/java/com/mysema/query/collections/MiniApiTest.java index e60a7bed7..4e2040f6f 100644 --- a/querydsl-collections/src/test/java/com/mysema/query/collections/MiniApiTest.java +++ b/querydsl-collections/src/test/java/com/mysema/query/collections/MiniApiTest.java @@ -154,7 +154,7 @@ public class MiniApiTest { Cat other = new Cat(); from($(c),cats) - .where($(c.equals(other))) + .where($(c).eq(other)) .iterate($(c)).iterator(); }