Home » Database » DB_DataObject » Bug #4188
update docs need clone() adding
Details
| Submitted | 2005-04-20 14:50 UTC |
|---|---|
| From | pear at drn dot org |
| Assigned | alan_k |
| Status | Closed |
| Package | DB_DataObject |
| PHP Version | 5.0.3 |
| OS | Solaris 9 |
| Roadmaps | (Not assigned) |
Comments
[2005-04-20 14:50 UTC] pear at drn dot org
Description:
------------
The facility to update a row based on differences between a previous version doesn't appear to work.
The trace shows that UPDATE is never being called.
It update() works fine without the $original parameter - but this obviously means that every DB column is updated, rather than just those that have changed.
Reproduce code:
---------------
The following example from the documentation is an example that doesn't work:
person = new DataObjects_Person;
$person->get(12);
$original = $person; // clone or copy
$person->name='fred';
$person->update($original);
Expected result:
----------------
The system should perform the update.
Actual result:
--------------
Nothing - the system appears to simply ignore the update call.
[2005-04-20 15:10 UTC] pear at drn dot org
Doh! Apologies. Will think before writing in future...
Ben
[2005-04-20 15:25 UTC] pear at drn dot org
Bogus bug - unless you think the docs could do with a reminder for silly folk like me.