mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Hydration fails because of keyword casing (oracle) #7410
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @patrick1100 on GitHub (Aug 20, 2024).
Bug Report
Summary
When using an Oracle database, we get the error
"no identity/no ID values set"on Windows systems or"Undefined array key 'myFieldName'"on Unix systems when using thefind()method of an entity.The entity is not found because the case of the key term in the FieldMappings array differs in the "hydration".
The correct upper/lower casing for the key in
hydrateColumnInfo()of theAbstractHydrator.phpwill fix this issue$key = $this->getSQLResultCasing($this->_platform, $key);Current behavior
Exception
"no identity/no ID values set"on Windows systems or"Undefined array key 'myFieldName'"on Unix systemsHow to reproduce
$entityManager->find(MyEntity::class, 'myId');Expected behavior
Returning the entity