Doctrine 1
  1. Doctrine 1
  2. DC-783

Doing introspection of postgres datagbases with sequences for columns does not generate 'nextval(sequence_name)::regclass' for default value

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.1
    • Fix Version/s: None
    • Component/s: Import/Export
    • Labels:
      None
    • Environment:
      ubuntu/apache/postgres/php (LAP2/LAPP) Symfony 1.4.4 unmodified (orignal doctrine)

      Description

      After database is introspected, yaml file worked on for minor tweeks, and normal development cycle of drop database/rebuild database & sql, regular sql scrips and build in fuctions expecting the sequenced primary key columns to automatically create their own id from the sequence is broken. Found that in no case does this version of Doctrine put into the YML file

      'nextval(sequenceName_seq'::regclass)

      for the default value of the autoincrementing columns. Doing so should not affect any operation of the Doctrine library, as Doctrine gets the value independently by that exact call, and inserts that value into the column during inserts.

      BUT, *NOT* having that as the default value BREAKS any SQL scripts or quick and dirty tasks via PGADMIN3 or any stored procedures expecting the column to assign itself the default value.

      Summary, it won't hurt doctrine's operation
      but it'll help non doctrine operations.

      Seems like it should be done.

        Activity

        Hide
        Dennis Gearon added a comment -

        I tried manually adding the default value to the yml file and symfony/doctrine ignores it - it never gets set in the next newly created database. Hmmmmm.

        Show
        Dennis Gearon added a comment - I tried manually adding the default value to the yml file and symfony/doctrine ignores it - it never gets set in the next newly created database. Hmmmmm.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Dennis Gearon
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: