filterByType($objectIdentity->getType()) ->findOneOrCreate($con) ; if ($obj->isNew()) { $obj->save($con); } return $obj; } }