Re: DataObject, postgres insert return vals.
| From: | Justin Patrin | Date: | Sun, 30 Apr 2006 18:39:35 +0000 |
| Subject: | Re: DataObject, postgres insert return vals. | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-23897@lists.php.net to get a copy of this message | ||
On 4/30/06, John Ensign <justjohn@gmail.com> wrote:
Hi all, Im using pg 7.4 and the latest DataObject package. Maybe im losing my mind but... On successful inserts all i get returned is 1 instead of the new pk value. Is DO for pg set to return 1 or true on successful insert? ( I was hoping it would load up the new primary key into the object. )insert() *should* return the PK, but there are code paths that don't do this. The PK also *should* be set in the DO. If this isn't happening I suggest you search the filed bugs and the mailing list as this has been discussed before, and also try tracing into the DO code to see what's happening. Also, make sure that your PK is set up correctly. -- Justin Patrin