[Sortable] processDeletion fails if $object is a proxy #2510
Labels
Bug
A confirmed bug in Extensions that needs fixing.
Sortable
Still Relevant
Mark PRs that might've been auto-closed that are still relevant.
Objects registered for deletion in the UOW can be non-initalized proxies.
In this case the
$position
property read inprocessDeletion
returns null:https://github.com/doctrine-extensions/DoctrineExtensions/blob/main/src/Sortable/SortableListener.php#L518
$position = $meta->getReflectionProperty($config['position'])->getValue($object);
This will create invalid SQL statements in
updatePositions
.Should we use
EntityWrapper
to initialize proxies and load values from entities/proxies?The text was updated successfully, but these errors were encountered: