Greetings , I am trying out active record. So far it seems to be great though it cant seem to get it work smoothly. Some of the methods work but others don't For example $user=new user(); foreach(user::find('all') AS $row)
{ echo "$row->username <br>"; //this works fine. }
//howwever when options are supplied or validates_uniqueness_of is used. an exception is thrown foreach (user::find('all','order'=>"created DESC ,'limit'=>10"))
{ echo "$row->username <br>"; //this results in /*Fatal error: Uncaught exception 'ActiveRecord\RecordNotFound' with message 'Couldn't find all user with IDs (all,created DESC ,'limit'=>10) (found 0, but was looking for 2) */ }
I am using php 5.3.4 and using nightly build (May 8 2013) Please advise on how to fix this.
Subject: Fatal error: Uncaught exception 'ActiveRecord\RecordNotFound'
Greetings , I am trying out active record. So far it seems to be great though it cant seem to get it work smoothly.
Some of the methods work but others don't
For example
$user=new user();
foreach(user::find('all') AS $row) {
echo "$row->username <br>"; //this works fine.
}
//howwever when options are supplied or validates_uniqueness_of is used. an exception is thrown
foreach (user::find('all','order'=>"created DESC ,'limit'=>10")) {
echo "$row->username <br>";
//this results in
/*Fatal error: Uncaught exception 'ActiveRecord\RecordNotFound' with message 'Couldn't find all user with IDs (all,created DESC ,'limit'=>10) (found 0, but was looking for 2)
*/
}
I am using php 5.3.4 and using nightly build (May 8 2013)
Please advise on how to fix this.