Re: Structures_DataGrid, automatic DB_DataObject joinAdd experiment
| From: | arnaud sellenet | Date: | Sat, 30 Dec 2006 15:34:55 +0000 |
| Subject: | Re: Structures_DataGrid, automatic DB_DataObject joinAdd experiment | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-26232@lists.php.net to get a copy of this message | ||
Sorry for the double(triple?) post, my message never came back to me so I thought it was rejected or lost or something.
I've written a quick example here : http://demental.info/pear_exp/
in case it could clarify.
Is there any test suite for DB_DataObject ? Because
commenting from line 3091 to 3099 DataObject.php
if ($joinCol !== false) {
$this->raiseError(
"joinAdd: You cannot target a join column in the " .
"'link from' table ({$obj->__table}). " .
"Either remove the fourth argument to joinAdd() ".
"({$joinCol}), or alter your links.ini file.",
DB_DATAOBJECT_ERROR_NODATA);
return false;
}
makes me get rid of this problem. But I'm not sure about the side effects.
Le 30 déc. 06 à 02:20, Olivier Guilyardi a écrit :
Hi Arnaud, Please don't post the same message several times. arnaud sellenet a écrit :I'm trying to make a DB_DataObject driver for Structures_DataGrid that aims to handle links and automatically do a joined query using joinAdd (see http://hashbin.com/114.html for source code). The joinAdd are created in the bind() method.That looks interesting, but complex too. Could you please give an example of what you are trying to achieve?This works fine except for nested links. my links.ini : [envoi_campagne] mail_id = addressbook:id campagne_id = campagne:id relance_id = envoi_campagne:idAnd here is the debug output :DataObjects_Envoi_campagne: ERROR: joinAdd: You cannot target a join column in the 'link from' table (envoi_campagne). Either remove the fourth argument to joinAdd() (relance_id), or alter your links.ini file.Thanks DB_DataObject we have a meaningful and precise error message. So I think you should first try and solve this. Unfortunately I'm no expert when it comes to DB_DataObject and joins. Could anyone on the list help Arnaud with this error message? Regards, -- Olivier --PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php