mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[PR #681] [CLOSED] Sequence generator fix #8549
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?
📋 Pull Request Information
Original PR: https://github.com/doctrine/orm/pull/681
Author: @lighthart
Created: 5/29/2013
Status: ❌ Closed
Base:
master← Head:SequenceGenerator_fix📝 Commits (2)
b88445eUpdated SequenceGenerator->generate() to read class metadata for sequence name557de29Handles null entity📊 Changes
1 file changed (+4 additions, -0 deletions)
View changed files
📝
lib/Doctrine/ORM/Id/SequenceGenerator.php(+4 -0)📄 Description
$this->_sequenceName=$em->getClassMetadata(get_class($entity))->sequenceGeneratorDefinition['sequenceName'];
The sequence generator does not read the class metadata, so if there is table remapping via event listeners, any new entity won't have the appropriate changes in table names.
This pull request adds a remap the Sequence Generator to read the class metadata to determine the sequence name if there is an entity passed to the generate function.
Tests: 1854, Assertions: 6224, Skipped: 96.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.