Files
dgarcia 318b5b9da2 fix(criteria): compare backed enums by their scalar value
Using an enum as a criteria value reached PDO as an object and failed with
"Object of class X could not be converted to string". Filtering by a state
column - the most natural thing to do with an enum-mapped property - was
impossible.

CriteriaCompiler now unwraps \BackedEnum both for a plain value and inside an
an IN list.

Covered by CriteriaCompilerEnumTest.
2026-11-15 14:37:54 -03:00

12 lines
171 B
PHP

<?php
declare(strict_types=1);
namespace Camelia\Orm\Tests\Fixture;
enum EstadoPedido: string
{
case Pendiente = 'pendiente';
case Confirmado = 'confirmado';
}