PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » DB_DataObject » Bug #2207

joinAdd: Links don't load if isn't data table auto generated

Details

Submitted2004-08-24 19:19 UTC
Fromfela at ds dot pg dot gda dot pl
StatusNo Feedback
PackageDB_DataObject
PHP Version5CVS-2004-08-24 (dev)
OSLinux
Roadmaps(Not assigned)

Comments

[2004-08-24 19:19 UTC] fela at ds dot pg dot gda dot pl

Description:
------------
if I does not use the 'auto generated tables data' and I overrided functions table() keys() links(), but links in joinAdd() function are not loaded. If links() are not overrided, it doesn't work too. It seems to work in another functions (insert, update, ...).

Reproduce code:
---------------
I put to joinAdd() function, after searching links in $_DB_DATAOBJECT['LINKS'][$this->_database] (DataObject.php line ~2670) this code:

[code]
if (!isset($links[$obj->__table])) $links[$obj->__table] = $obj->links();
[/code]

and it work correctly but maybe it could be in another place. And I don't know if this will broke links if they are in .links.ini file

Expected result:
----------------
IMO set manulay in my application $_DB_DATAOBJECT['LINKS'] is not good. So I expect that joinAdd will be load links from my overrided function links().

Actual result:
--------------
Now joinAdd recive error "joinAdd: {$obj->__table} has no link with {$this->__table}"