DB_DataObjects getLinks() bug?
| From: | Mark Petersen | Date: | Fri, 08 Jul 2005 18:28:03 +0000 |
| Subject: | DB_DataObjects getLinks() bug? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-19919@lists.php.net to get a copy of this message | ||
When I some something like this:
$warrior = new DataObjects_warrior_items;
//Set Items for logged in warrior
$warrior->warriorID = $auth->getAuthData('id');
//find items
$warrior->find();
while ($warrior->fetch()) {
$warrior->getLinks();
//print object
print_r($warrior);
}
While the record updates appropriately when fetched, I only get the links for the first record fetched. The database structure is as below:
warrior
id
name
password
warriorItems
itemID
warriorID
itemDescription
warriors.links.ini
[warriorItems]
warriorID = warrior:id
Is there some command I need to remove the old links? I want to keep the records I've already found of course, so I can't create a new object. I guess I'll try something like this after the e-mail:
$warrior_temp = $warrior;
$warrior_temp->getLinks();
print_r($warrior_temp);
I wouldn't think that should be necessary though... possibly a bug? When I fetch the next record I assume it would drop the old links.
Thanks,
markp