private function propertyExists($object, $fieldName)
    {
        if (property_exists($object, $fieldName)) {
            return true;
        }

        foreach (explode('.', $fieldName) as $field) {
            if (property_exists($object, $field)) {
                $object = $object->{$field};
                if (!is_object($object)) {
                    break;
                }
                continue;
            } else {
                return false;
            }
        }
        return true;
    }