Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1008

Entity Generator Stub Method For Id Generator

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.0.2, 2.1
    • Component/s: Tools
    • Security Level: All
    • Labels:
      None

      Description

      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')) {

        Activity

        Hide
        Benjamin Eberlei added a comment -

        Fixed

        Show
        Benjamin Eberlei added a comment - Fixed

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Stephen Walker
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: