Redis
This commit is contained in:
@ -76,7 +76,7 @@ class Proyecto extends Ideal\Repository
|
||||
->select($this->columns())
|
||||
->from("{$this->getTable()} a")
|
||||
->joined($this->joinTerreno())
|
||||
->where("name = ?");
|
||||
->where("descripcion = ?");
|
||||
return $this->fetchOne($query, [$name]);
|
||||
}
|
||||
public function fetchAllActive(): array
|
||||
|
@ -16,7 +16,16 @@ class Subsidio extends Ideal\Repository
|
||||
|
||||
public function create(?array $data = null): Model\Venta\Subsidio
|
||||
{
|
||||
$map = new Implement\Repository\MapperParser(['pago', 'subsidio']);
|
||||
$map = (new Implement\Repository\MapperParser())
|
||||
->register('pago', (new Implement\Repository\Mapper())
|
||||
->setProperty('ahorro')
|
||||
->setFunction(function($data) {
|
||||
return $this->pagoRepository->fetchById($data['pago']);
|
||||
}))
|
||||
->register('subsidio', (new Implement\Repository\Mapper())
|
||||
->setFunction(function($data) {
|
||||
return $this->pagoRepository->fetchById($data['subsidio']);
|
||||
}));
|
||||
return $this->parseData(new Model\Venta\Subsidio(), $data, $map);
|
||||
}
|
||||
public function save(Define\Model $model): Model\Venta\Subsidio
|
||||
|
Reference in New Issue
Block a user