DDC-1008: Entity Generator Stub Method For Id Generator #1255

Closed
opened 2026-01-22 13:07:23 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Jan 31, 2011).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user sw45859:

In the EntityGenerator when the id setting has a generator of NONE it does not add the stub method for setting the id keys value, here's my fix:

around line 478 in the _generateEntityStubMethods function, the first foreach which checks for the id mapping, change:

        if ( ! isset($fieldMapping['id']) ](| ! $fieldMapping['id')) {

TO

        if ( ! isset($fieldMapping['id']) ](| ! $fieldMapping['id') || ($this->_getIdGeneratorTypeString($metadata->generatorType) == 'NONE')) {
Originally created by @doctrinebot on GitHub (Jan 31, 2011). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user sw45859: In the EntityGenerator when the id setting has a generator of NONE it does not add the stub method for setting the id keys value, here's my fix: around line 478 in the _generateEntityStubMethods function, the first foreach which checks for the id mapping, change: ``` if ( ! isset($fieldMapping['id']) ](| ! $fieldMapping['id')) { ``` TO ``` if ( ! isset($fieldMapping['id']) ](| ! $fieldMapping['id') || ($this->_getIdGeneratorTypeString($metadata->generatorType) == 'NONE')) { ```
admin added the Bug label 2026-01-22 13:07:23 +01:00
admin closed this issue 2026-01-22 13:07:24 +01:00
Author
Owner

@doctrinebot commented on GitHub (Feb 2, 2011):

Comment created by @beberlei:

Fixed

@doctrinebot commented on GitHub (Feb 2, 2011): Comment created by @beberlei: Fixed
Author
Owner

@doctrinebot commented on GitHub (Feb 2, 2011):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Feb 2, 2011): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#1255