Re: Data Ojbect and joinAdd
| From: | Alan Knowles | Date: | Sun, 09 Jan 2005 01:19:31 +0000 |
| Subject: | Re: Data Ojbect and joinAdd | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-35423@lists.php.net to get a copy of this message | ||
Can you file this as a bug - it should not depend on links.ini
Regards
Alan
Matt Craig wrote:
It looks like from reading the code and some testing that, unless there are entries for the DateObject in <database>.links.ini joinAdd() will fail.
Despite having arguments indicating a join type and a field to join on joinAdd returns the error
"{$obj->__table} has no link with {$this->__table}",
This simple bit of code:
2741a2742,2746
if ($ofield === false && $joinCol) {
$ofield = $joinCol;
$tfield = $joinCol;
}
makes this work when the field names are the same in each table, without the need for an entry in the links.ini file. This is very handy in many cases.
Is there a design reason to require that the link be present in the links.ini file before allowing the programmer to create a link?
matt