Skip to content

Conversation

@danfraticiu
Copy link

As described in issue 12225

When there is a oneToMany relation where the children use single table inheritance, if the relation is re-fetched after a filter changed, SingleTablePersister::getSelectColumnsSQL will generate new aliases for the child entity fields. Then ResultSetMapping::addIndexBy picks the first alias that matches the indexBy field, which doesn't exist in the updated list. This causes ObjectHydrator:502 to throw an ErrorException: Warning: Undefined array key

This PR prevent creating new aliases.

The change is inspired by the code in BasicEntityPersister::getSelectColumnSQL which reuses the aliases that already exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant