src/Data/DefaultDataProvider.php
public function sameModels($firstModel, $secondModel)
    {
        foreach ($firstModel as $key => $value) {
            if ($key === $this->idProperty) {
                continue;
            }

            if (\is_array($value)) {
                if (!\is_array($secondModel->getProperty($key))) {
                    return false;
                }

                if (\serialize($value) !== \serialize($secondModel->getProperty($key))) {
                    return false;
                }
            } elseif ($value !== $secondModel->getProperty($key)) {
                return false;
            }
        }

        return true;
    }
public function sameModels($firstModel, $secondModel)
    {
        foreach ($firstModel as $key => $value) {
            if ($key === $this->idProperty) {
                continue;
            }

            if (\is_array($value)) {
                if (!\is_array($secondModel->getProperty($key))) {
                    return false;
                }

                if (\serialize($value) !== \serialize($secondModel->getProperty($key))) {
                    return false;
                }
            } elseif ($value !== $secondModel->getProperty($key)) {
                return false;
            }
        }

        return true;
    }
public function sameModels ( $ firstModel , $ secondModel ) { foreach ( $ firstModel as $ key => $ value ) { if ( $ key === $ this -> idProperty ) { continue ; } if ( \ is_array ( $ value ) ) { if ( ! \ is_array ( $ secondModel -> getProperty ( $ key ) ) ) { return false ; } if ( \ serialize ( $ value ) !== \ serialize ( $ secondModel -> getProperty ( $ key ) ) ) { return false ; } } elseif ( $ value !== $ secondModel -> getProperty ( $ key ) ) { return false ; } } return true ; }
Check if two models have the same values in all properties.

@param ModelInterface $firstModel  The first model to compare.
@param ModelInterface $secondModel The second model to compare.

@return boolean True - If both models are same, false if not.
Check if two models have the same values in all properties .