protected function updatePropertyAssociation($property, array $values)
    {
        $this->getPropertiesInfo();

        $oldValue = empty($values['oldValue']) ? null : $values['oldValue'];
        $newValue = empty($values['newValue']) ? null : $values['newValue'];

        $association = $this->_associationsList[$property];
        if (!empty($association)) {
            $associatedProperty = $association['property'];
            switch ($association['association']) {
                case 'inverted':
                    $invertedGetMethod = 'get' . ucfirst($associatedProperty);
                    $invertedSetMethod = 'set' . ucfirst($associatedProperty);
                    if ($oldValue !== null && $oldValue->$invertedGetMethod() === $this) {
                        $oldValue->$invertedSetMethod(null);
                    }
                    if ($newValue !== null && $newValue->$invertedGetMethod() !== $this) {
                        $newValue->$invertedSetMethod($this);
                    }
                    break;

                case 'mapped':
                    $itemName = $association['itemName'];
                    $mappedGetMethod = 'get' . ucfirst($associatedProperty);
                    $mappedAddMethod = 'add' . ucfirst($itemName);
                    $mappedRemoveMethod = 'remove' . ucfirst($itemName);

                    if ($oldValue !== null && CollectionManager::collectionContains($this, $oldValue->$mappedGetMethod())) {
                        $oldValue->$mappedRemoveMethod($this);
                    }
                    if ($newValue !== null && !CollectionManager::collectionContains($this, $newValue->$mappedGetMethod())) {
                        $newValue->$mappedAddMethod($this);
                    }
                    break;
            }
        }
    }