Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2405

Changing strategy generates bad query.

    Details

    • Type: Bug Bug
    • Status: Reopened
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      Description

      For (unit, acceptance, functional) testing purpose I need to change the strategy of my GameStuff Entity class.

      In previous version is was using php instruction below, but since doctrine orm 2.3, it doesn't work anymore.

      $orm->getClassMetaData('Entities\GameStuff')->setIdGeneratorType(\Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_NONE);

      will trigger:

      Doctrine\DBAL\DBALException: An exception occurred while executing 'INSERT INTO vbank_accounts (game_id, updated_at, created_at) VALUES (?, ?, ?)' with params

      {"1":1000010, "2":0,"3":"2013-04-19 17:16:05","4":"2013-04-19 17:16:05"}

      :

      SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens

        Activity

        Van Rotemberg created issue -
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Invalid [ 6 ]
        Van Rotemberg made changes -
        Resolution Invalid [ 6 ]
        Status Resolved [ 5 ] Reopened [ 4 ]

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Van Rotemberg
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated: