DataObject datasource for DataGrid
| From: | electroteque | Date: | Sun, 09 Jan 2005 11:22:02 +0000 |
| Subject: | DataObject datasource for DataGrid | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-16843@lists.php.net to get a copy of this message | ||
Hi , I have discovered a huge problem with the DataObject datasource for DataGrid, one being that some bug for the toArray method is not fixed so its returning all the object vars and using them as the columns ! Here is what i found
// Can't use this until DB_DO Bug 1315 is fixed
//$rec = $this->_dataobject->toArray());
// REPLACE ME WITH ABOVE
$rec = get_object_vars($this->_dataobject);
its getting all the vars from the object and returning them as columns fuk
so in my DO's
var $__table = 'users'; // table namevar $_database = 'thedb'; these become the columns ! What can i do ?