Re: DataObjects , postgresql and sequences

From: Date: Fri, 04 Apr 2003 15:00:50 +0000
Subject: Re: DataObjects , postgresql and sequences
References: 1 2  Groups: php.pear.general php.pear.general 
Request: Send a blank email to pear-general+get-4648@lists.php.net to get a copy of this message
I've been working with postgres for the last few weeks - alot of the updates are in CVS: - the generator can now detect default nextval(....) as a primary key - however due to a bug in pear's db (see bugs.php.net) table info for postgres does not correctly return the right value for defaults. - that logic bit should have been sorted out. - check CVS. technically it should have a config option for sequence format. at present it will use pear db's defaults. BTW. Gtk_MDB_Designer can now generate links.ini files for databases - and you can draw cute line between tables, just like access :) Regards Alan Xavier wrote:
Me again Ok, i've fixed it In fact, i must supply a list ok tables in the ignore_sequence_keys config directive, otherwise it doesn't work... is this a normal behaviour ? in DataObject.php: Line 589 -----------------------------------------------------------------------
     // big check for using sequences
        if (    ($key = @$keys[0]) &&
                ($dbtype != 'mysql') &&
                (@$options['ignore_sequence_keys'] != 'ALL') &&
                (is_array(@$options['ignore_sequence_keys']) &&
@!in_array($this->__table,$options['ignore_sequence_keys']))
            )
        {
            if (!($seq = @$options['sequence_'. $this->__table])) {
                $seq = $this->__table;
            }
            $this->$key = $__DB->nextId($this->__table);
        }^
----------------------------------------------------------------------- Regards Xavier


« previous php.pear.general (#4648) next »