private function prepareData(array $data)
    {
        $inserts = array_dot($data);
        $updates = [];
        $deletes = [];

        foreach ($this->model()->lists('key') as $key) {
            if (isset($inserts[$key]))
                $updates[$key] = $inserts[$key];
            else
                $deletes[]     = $key;

            unset($inserts[$key]);
        }

        return [$inserts, $updates, $deletes];
    }