DataObjects , problem with unique field and new versions

From: Date: Wed, 28 May 2003 14:55:54 +0000
Subject: DataObjects , problem with unique field and new versions
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-5658@lists.php.net to get a copy of this message
Hi there, i'me experiencing a trouble with latest versions on DataObjects. here it is: I got a postgresql table , it looks like : -- Table: public.t_webusers CREATE TABLE public.t_webusers ( usr_id int8 NOT NULL, usr_email varchar(100), usr_telephone varchar(20), usr_date_enreg timestamp, usr_date_maj timestamp, CONSTRAINT webuser_email UNIQUE (usr_email), CONSTRAINT pk_t_webusers PRIMARY KEY (usr_id), ) WITH OIDS; so i have a primary Key (usr_id) and a field which is a Unique key. When calling setFrom() method, and after insert() , the usr_email field is not feeded. The behaviour had been added since 0.18 and is located in DataObject.php line : 1801 if (in_array($k,$keys)) {
                continue; // dont overwrite keys
            }
            if (!$k) {
                continue; // ignore empty keys!!! what
} This behaviour should be applyed only on Primary keys or is recommended for Unique keys too ? Regards -- Xavier

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