DataObject, sequences and validation

From: Date: Mon, 15 Nov 2004 19:59:56 +0000
Subject: DataObject, sequences and validation
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-15540@lists.php.net to get a copy of this message
Hi, Using DO 1.7.2, I have some code like this using Postgresql as the backend: $dbo = DB_DataObject::factory('sponsor'); $dbo->sequenceKey('sponsorid', true, 'sponsor_sponsorid_seq"); //... set a few field values, but don't touch the sequence ... $sponsorvalid = $dbo->validate(); but this comes back with an invalid value in sponsorid. I don't want to set a value in the field because Postgres is doing that. The field type is a non-null integer and DO thinks that since I have no value there it is invalid. I would like DO to know that having nothing in the sponsorid field is fine. What should I be doing differently? thanks, matt -- Disclaimer: This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited.

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