if (propertyKey.indexOf(".")!=-1) {
if (propertyKey.indexOf(".")!=-1 && propertyKey.indexOf("@") == 0) {
    public Object smartRelationship(D2WContext c) {        Object result = null;        Object rawObject=c.valueForKey("object");        String propertyKey=c.propertyKey();        if(propertyKey != null) {            if (rawObject!=null && rawObject instanceof EOEnterpriseObject) {                EOEnterpriseObject object=(EOEnterpriseObject)rawObject;                EOEnterpriseObject lastEO=object;                if (propertyKey.indexOf(".")!=-1) {                    String partialKeyPath=KeyValuePath.keyPathWithoutLastProperty(propertyKey);                    Object rawLastEO=object.valueForKeyPath(partialKeyPath);                    lastEO=rawLastEO instanceof EOEnterpriseObject ? (EOEnterpriseObject)rawLastEO : null;                }                if (lastEO!=null) {                    EOEntity entity=EOModelGroup.defaultGroup().entityNamed(lastEO.entityName());                    String lastKey=KeyValuePath.lastPropertyKeyInKeyPath(propertyKey);                    result=entity.relationshipNamed(lastKey);                }            }            if (result==null) {                // working around D2W bug                result=c.relationship();            }        }        return result;    }