$records[$key] = $dataobject->__clone () ;
** note this has changed to
$records[$key] = clone($dataobject);
in the next release (due to the PHP5 cloning method changing)
I'm not 100% sure on adding a class like the one you attached. - it may seem simpler, but my initial feeling is that you are sacraficing a significant amount of code readiblity. - especially by doing magic things with keys.
for the fetch method - the intention was to add something like:
DB_DataObject::factory('thetable',array(
'condition' => .....,
'select' =>
....
)
I've not had time to look into the details of this.. - like how to implement inserts/updates/deletes using this factory + array...
Regards
Alan
}
return $records ;
}
}
?>
HTH
Mark