Re: cvs: pear /DB_DataObject DataObject.php

From: Date: Mon, 25 Nov 2002 07:31:41 +0000
Subject: Re: cvs: pear /DB_DataObject DataObject.php
References: 1  Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-7570@lists.php.net to get a copy of this message
The actual sequence name is configurable, please use $dbh->getSequenceName($this->__table) instead of just concatenating '_seq'. - Stig On Fri, 2002-11-22 at 10:30, Alan Knowles wrote: > alan_k Fri Nov 22 04:30:47 2002 EDT > > Modified files: > /pear/DB_DataObject DataObject.php > Log: > Attempt to fix sequence creation for non-mysql databases using tablename_seq > > > Index: pear/DB_DataObject/DataObject.php > diff -u pear/DB_DataObject/DataObject.php:1.36 pear/DB_DataObject/DataObject.php:1.37 > --- pear/DB_DataObject/DataObject.php:1.36 Tue Nov 19 19:03:25 2002 > +++ pear/DB_DataObject/DataObject.php Fri Nov 22 04:30:47 2002 > @@ -15,7 +15,7 @@ > // | Author: Alan Knowles <alan@akbkhome.com> > // +----------------------------------------------------------------------+ > // > -// $Id: DataObject.php,v 1.36 2002/11/20 00:03:25 alan_k Exp $ > +// $Id: DataObject.php,v 1.37 2002/11/22 09:30:47 alan_k Exp $ > // > // Object Based Database Query Builder and data store > // > @@ -505,7 +505,7 @@ > $keys = $this->_get_keys(); > $dbtype = $connections[$this->_database_dsn_md5]->dsn["phptype"]; > if (($key = @$keys[0]) && ($dbtype != 'mysql')) { > - $this->$key = $__DB->nextId(); > + $this->$key = $__DB->nextId($this->__table.'_seq'); > } > > foreach($items as $k => $v) { > @@ -1464,4 +1464,4 @@ > } > > DB_DataObject::staticInitialize(); > -?> > \ No newline at end of file > +?> > >

« previous php.pear.cvs (#7570) next »