Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-576

New entities must have primary key values right after flushing with IDENTITY strategy

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0-BETA1
    • Fix Version/s: 2.0-BETA2
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None
    • Environment:
      PostgreSQL 8.4.3, Ubuntu 10.04

      Description

      After insertion of some new entity the primary key must be set. Example code is attached above.

        Activity

        Hide
        Roman S. Borschel added a comment - - edited

        I think I reproduced this already. Seems to be related to PostgreSQL + IDENTITY only. The SequenceIdentityGenerator must be used but apparently it is not used.

        Thanks for the report. Will keep you updated.

        ps. The standalone reproduce scripts are good. Thanks for that! If you are interested it would be even better if the test code would be provided as a unit test or with some additional comments and/or assertions about what the desired behavior is or where the supposedly wrong behavior is (even if it is very obvious, like in this issue).

        Show
        Roman S. Borschel added a comment - - edited I think I reproduced this already. Seems to be related to PostgreSQL + IDENTITY only. The SequenceIdentityGenerator must be used but apparently it is not used. Thanks for the report. Will keep you updated. ps. The standalone reproduce scripts are good. Thanks for that! If you are interested it would be even better if the test code would be provided as a unit test or with some additional comments and/or assertions about what the desired behavior is or where the supposedly wrong behavior is (even if it is very obvious, like in this issue).

          People

          • Assignee:
            Roman S. Borschel
            Reporter:
            Václav Novotný
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: