Doctrine 1
  1. Doctrine 1
  2. DC-693

Last_insert_id is not save in properties "id" after save() (using sqlite)

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Can't Fix
    • Affects Version/s: 1.2.2
    • Fix Version/s: None
    • Component/s: Connection
    • Labels:
      None
    • Environment:
      php- 5.2.10, mysql 5.1,sqlite 3.0

      Description

      using mysql
      --------------------
      $user = new User;
      $user->name = 'Job';
      $user->save();

      echo $user->id; //1 (for example);

      it`s ok!
      -------------------------------------------------
      using sqlite
      -//-
      echo $user->id; //0 (always and any where );

        Activity

        Hide
        Dennis Gearon added a comment -

        I have same problem on a postgresql table, 1 out of 10 in the schema. The table has 6 primary foreign keys and a single autoincrementing primary integer key, 'id', column. 'id' is unavailable after a save(). I'm getting around this with a search for the inserted record, but it's a slow PITA.

        Show
        Dennis Gearon added a comment - I have same problem on a postgresql table, 1 out of 10 in the schema. The table has 6 primary foreign keys and a single autoincrementing primary integer key, 'id', column. 'id' is unavailable after a save(). I'm getting around this with a search for the inserted record, but it's a slow PITA.
        Hide
        Dennis Gearon added a comment -

        sorry, ubuntu 9.10, postgres-8.4, symfoy 1.4.4

        Show
        Dennis Gearon added a comment - sorry, ubuntu 9.10, postgres-8.4, symfoy 1.4.4
        Hide
        Jonathan H. Wage added a comment -

        I think this is an unfortunate problem that cannot be fixed. You cannot have a auto increment primary key with some other composite primary keys.

        Show
        Jonathan H. Wage added a comment - I think this is an unfortunate problem that cannot be fixed. You cannot have a auto increment primary key with some other composite primary keys.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Valery Sizov
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: