FIX: Key de prorrateo
This commit is contained in:
@ -63,9 +63,15 @@ abstract class Repository implements Define\Repository
|
||||
return $this->fetchMany($query);
|
||||
}
|
||||
|
||||
protected string $key = 'id';
|
||||
public function setKey(string $key): Repository
|
||||
{
|
||||
$this->key = $key;
|
||||
return $this;
|
||||
}
|
||||
protected function getKey(): string
|
||||
{
|
||||
return 'id';
|
||||
return $this->key;
|
||||
}
|
||||
protected function parseData(Define\Model $model, ?array $data, Implement\Repository\MapperParser $data_map): Define\Model
|
||||
{
|
||||
|
@ -12,7 +12,8 @@ class Prorrateo extends Ideal\Repository
|
||||
public function __construct(Define\Connection $connection, protected Repository\Venta\Unidad $unidadRepository)
|
||||
{
|
||||
parent::__construct($connection);
|
||||
$this->setTable('unidad_prorrateo');
|
||||
$this->setTable('unidad_prorrateo')
|
||||
->setKey('unidad_id');
|
||||
}
|
||||
|
||||
public function create(?array $data = null): Model\Venta\Unidad\Prorrateo
|
||||
|
Reference in New Issue
Block a user