private function filterAttributes($determineDatabase = false)
    {
        $databaseAttributes = \array_merge(
            (array) $this->databaseKeys['common'],
            (array) $this->databaseKeys[$this->getScope()]
        );

        if ($determineDatabase) {
            return \array_intersect_key($this->attributes, \array_flip($databaseAttributes));
        }

        return \array_diff_key($this->attributes, \array_flip($databaseAttributes));
    }