Re: RE : [PEAR] DataObject: upgrade from 1.2 to 1.3 problems

From: Date: Tue, 25 Nov 2003 00:40:45 +0000
Subject: Re: RE : [PEAR] DataObject: upgrade from 1.2 to 1.3 problems
References: 1 2  Groups: php.pear.general php.pear.general 
Request: Send a blank email to pear-general+get-9120@lists.php.net to get a copy of this message
This was part of the plan to reduce the size of print_r, the data size (and theoretically improve performance..) things like select/condition/limit/order etc. are stored in an array which is cleared after a query. I already added this to ->get(), "You should avoid calling get on the same object instance twice, as this will result in unexpected results." The Changelog should have flagged this - "You may not run a find on an object that has already had this run on it.." But I forgot to add it to the changelog :( Previously I did the clearing of the query on fetch(), but this adds an extra call to the fetch method, (and slows things down a little..) prehaps just going back to this, and doing a simple variable check is the best compramise.. Regards Alan Jeroen Houben wrote:
Why though? And isn't this a BC break? My second error definately sounds like a BC break, although it might just be a result of the first error. LIMBOURG Arnaud wrote:
Hi, I had the same message, you can avoid it by doing $do_1 = new DataObject; $do_2 = $do_1->__clone(); $do_1->find(); About the second error, i don't know. Arnaud.
thw Var_Dump() call gives me a message: You cannot do two queries on the same object (copy it before finding) Also I get notices: Notice: Undefined property: start_stamp in xxx on line 99 Notice: Undefined property: end_stamp in xxx on line 100 This must have something to do with the selectAdd not working as it worked before (?) Help much appreciated,


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