public function findByPk(Model $model, $mPrimaryKey) { $this->where($model->getAlias() . '.' . $model->getPrimaryKey() . ' = :pk')->setParameter('pk', $mPrimaryKey); return $this; }