Commit ed757400 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Passage par référence des data. Cela permet ainsi de récupérer l'ID d'un enregistrement

parent 40ffd3a5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -278,7 +278,7 @@ class Table
     * @throws Exception\BddException
     * @throws Exception\BddIndexExistsException
     */
    public function insert(array $data, array $options = []): bool
    public function insert(array &$data, array $options = []): bool
    {
        if (!isset($data['ID']) && $this->hasId() && $this->hasSequence()) {
            $data['ID'] = $this->getBdd()->sequenceNextVal($this->ddl['sequence']);