Jira issue originally created by user zorfling:
When using a sequence in Oracle as part of a composite key and the sequence is defined second, Doctrine retrieves from the sequence correctly but incorrectly assigns to the first key (which in this case is not the correct column)
* @Column(name="submission_id", type="integer")
* @Column(name="model_id", type="integer")
* @SequenceGenerator(sequenceName="model*id*seq", initialValue=1, allocationSize=1)
Doctrine correctly retrieves the sequence, however it then attempts to set the first identifier field (in this case submission_id) instead of the sequence key.
The problem appears in /Doctrine/ORM/UnitOfWork.php line 613.
$class->indentifier is hard coded to item 0.
$this->entityIdentifiers[$oid] = array($class->identifier => $idValue);
You can workaround this issue by defining the sequence first in the entity.
Comment created by @beberlei:
This is not allowed currently, there is a PR for custom id generators, but so long i am closing this as invalid.
Also i added an error exception which makes this kind of setup fail.
Issue was closed with resolution "Fixed"