protected function parametersOfUniqueConstraint($key, array $originalParameters, AppliesToResource $resource=null)
    {
        if (!$resource instanceof Entity) {
            return $originalParameters;
        }

        if (!$resource instanceof EloquentModel) {
            return $originalParameters;
        }

        // No support for nested keys currently
        if (strpos($key, '.') !== false) {
            return $originalParameters;
        }

        $table = $resource->getTable();
        $uniqueKey = $key;

        if ($resource->isNew()) {
            return [$table, $uniqueKey];
        }

        $id = $resource->getId();
        $primaryKey = $resource->getKeyName();

        return [$table, $uniqueKey, $id, $primaryKey];
    }