I'm having a problem with the loaded()
function of the Kohana ORM. I'm loading a record, and the record is definitely loaded since I can access its properties. However, the loaded()
function returns false
. Below is the code I'm using:
$sessionUuid = $this->request->query('session');
$session = ORM::factory('session')->where('uuid', '=', $sessionUuid)->find();
if (!$session->loaded()) {
echo "NOT LOADED: " . $session->user_id . "\n";
return;
}
The code below would output for example:
NOT LOADED: 5435
5435 being the correct user number, which shows that the record is in fact loaded. Does anybody know what could be causing this issue?