Re: DB_Dataoabject

From: Date: Thu, 20 Nov 2003 12:32:36 +0000
Subject: Re: DB_Dataoabject
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-23772@lists.php.net to get a copy of this message
Thing is, if this would not have been taken out, some databases (like MSSQL) would have had trouble with the INSERT and UPDATE queries, as you can't even mention the field in such a query if it is defined as auto_increment (or, in the case of MSSQL, "identity"). It really shouldn't be a BC issue. When you specify a value for the Primary Key and do an INSERT, it should be used by DataObject. If not, it will either use a new ID generated by a sequence or leave the field out of the query (using auto_increment). In an UPDATE query, the field will not be included in any case, because as it is the primary key of the row, it's already present. It makes no sense to update it. The field will be user in the WHERE clause though, to correctly identify the row.
I dn't exactly what went wrong (the code wasn't mine) but apparently an insert was done and DO wasn't taking the key into account. 1.2 is so i reverted to this version. Arnaud.

« previous php.pear.dev (#23772) next »