Status: New
Owner: jack.bates
Labels: Type-Defect Priority-Critical Milestone-Release-1.1
Component-Routing
New issue 1671 by [email protected]: QubitResourceRoute caches
incomplete query results
http://code.google.com/p/qubit-toolkit/issues/detail?id=1671
To reproduce this error:
========================
1)Login and create a new repository
2)Chose an information object from the "Relationships area -> Related
archival materials" drop-down list
3)Save the form data
Resulting error:
================
****
Notice: Undefined offset: 5 in
/Applications/MAMP/htdocs/qubit/lib/model/om/BaseObject.php on line 672
****
This seems to be due to
apps/qubit/modules/repository/actions/editAction.class.php, Line 348:
$params = $this->context->routing->parse(Qubit::pathInfo($value));
The sfPatternRouting::parse() method calls lib/QubitResourceRoute, Line 24:
$this->resource = QubitObject::getById($params['id']);
Which in caches the QubitObject search results (with the appropriate (5)
columns) in lib/model/om/BaseObject.php, Lines 40-50:
if (!isset(self::$objects[$key]))
{
$object = new $row[0];
$object->keys = $keys;
$object->row = $row;
$object->new = false;
self::$objects[$key] = $object;
}
Once the query results are cached, then future calls to
BaseObject::getFromRow() hit the cached results, such as
apps/qubit/modules/repository/actions/editAction.class.php, Line 366:
$informationObject = QubitInformationObject::getById($id);
This results in the above error when attempting to save the updated
$informationObject object to the database.
Expected result:
================
The QubitInformationObject::getById($id) should return a
QubitInformationObject ORM object with all of the necessary column data.
--
You received this message because you are subscribed to the Google Groups "Qubit
Toolkit Issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-issues?hl=en.