[PR #681] [CLOSED] Sequence generator fix #8549

Open
opened 2026-01-22 16:00:25 +01:00 by admin · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/681
Author: @lighthart
Created: 5/29/2013
Status: Closed

Base: masterHead: SequenceGenerator_fix


📝 Commits (2)

  • b88445e Updated SequenceGenerator->generate() to read class metadata for sequence name
  • 557de29 Handles 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.

## 📋 Pull Request Information **Original PR:** https://github.com/doctrine/orm/pull/681 **Author:** [@lighthart](https://github.com/lighthart) **Created:** 5/29/2013 **Status:** ❌ Closed **Base:** `master` ← **Head:** `SequenceGenerator_fix` --- ### 📝 Commits (2) - [`b88445e`](https://github.com/doctrine/orm/commit/b88445e1e9351910ea86228cc095dd447a721280) Updated SequenceGenerator->generate() to read class metadata for sequence name - [`557de29`](https://github.com/doctrine/orm/commit/557de29eddbb38a4c384f1a5e093a14533934996) Handles null entity ### 📊 Changes **1 file changed** (+4 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `lib/Doctrine/ORM/Id/SequenceGenerator.php` (+4 -0) </details> ### 📄 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
admin added the pull-request label 2026-01-22 16:00:25 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#8549