Skip to content

CRUD with updated value outside model condition #2204

@nocelab

Description

@nocelab

I need to set a Crud with a records subset.
The Model has the combo field:

$this->addField('tipo', ['values' => ['x' => 'fix', '+' => 'new', '-' => 'removed']]);

and I add condition with:

$mod->addCondition($mod->expr("tipo = '+'"));

Crud show correctly the recordset but when I try to edit a row, changing tipo value, I get this error on saving:

Critical Error
Atk4\Data\Exception: Record with specified ID was not found

model: Modello
id: 3311
scope: 'expression 'tipo = '+'''
action: Atk4\Data\Model\UserAction (edit)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions