WIP sofar

This commit is contained in:
Deon George
2011-04-06 09:12:31 +10:00
parent 939d0a43d6
commit 6d858a982a
8 changed files with 202 additions and 9 deletions

View File

@@ -17,9 +17,13 @@ class ORM extends Kohana_ORM {
public function find($id = NULL) {
// Since TSM doesnt support LIMIT, we'll use find_all() but return the first record
foreach ($this->find_all() as $object) {
$this->_load_values($object->_object);
// In TSM Primary Keys are in upper case
if (is_null($id) OR $object->{$object->_primary_key} == strtoupper($id))
$this->_load_values($object->_object);
return;
// If we have found our item return
if ($this->_loaded)
return;
}
}