public function getRecordById(Model $model, $id, $deepRelation = true) {
        $model->id = $id;

        $data = $model->find('first', array(
            'conditions' => array($model->alias . '.' . $model->primaryKey => $id),
            'contain' => $this->getDeepRelations($model, $deepRelation)
        ));

        if ($data) {
            $model->set($data);
        }

        return $data;
    }