Possible change diff for file Doctrine/ORM/Persisters/BasicEntityPersister.php from Doctrine ORM 2.1.2.
Idea is to use the main table (not inherited one) if the column is a part of ID. So, I guess, it will be in both tables.
@@ -1197,7 +1197,7 @@ class BasicEntityPersister
$conditionSql .= $conditionSql ? ' AND ' : '';
if (isset($this->_class->columnNames[$field])) {
- if (isset($this->_class->fieldMappings[$field]['inherited'])) {
+ if (isset($this->_class->fieldMappings[$field]['inherited']) && empty($this->_class->fieldMappings[$field]['id'])) {
$conditionSql .= $this->_getSQLTableAlias($this->_class->fieldMappings[$field]['inherited']) . '.';
} else {
$conditionSql .= $this->_getSQLTableAlias($this->_class->name) . '.';
Test case.