diff --git a/src/main/java/com/tinkerpop/frames/annotations/PropertyAnnotationHandler.java b/src/main/java/com/tinkerpop/frames/annotations/PropertyAnnotationHandler.java index e6e2d5f..078a9b1 100644 --- a/src/main/java/com/tinkerpop/frames/annotations/PropertyAnnotationHandler.java +++ b/src/main/java/com/tinkerpop/frames/annotations/PropertyAnnotationHandler.java @@ -34,6 +34,9 @@ public Object processElement(final Property annotation, final Method method, fin element.setProperty(annotation.value(), value); } } + // If return type is this class, return this. + if (method.getReturnType().isAssignableFrom(element.getClass())) + return element; return null; } else if (ClassUtilities.isRemoveMethod(method)) { element.removeProperty(annotation.value());