Subject: Model has no attributes???
Here is my model...class Order extends ActiveRecord\Model { public static $table_name = "orders"; public static $primary_key = "o_key";
}
When I do this...$myOrder = new Order();$myOrder->o_key = $new_key;
I get the error...Fatal error: Uncaught exception 'ActiveRecord\UndefinedPropertyException' with message 'Undefined property: Order->o_key
Any insight or other questions needed to diagnose would be much appreciated.
Sorry... I say "has not attributes" because when I do this....echo count($myOrder->attributes()); ... I get a big fat zero!
(1-1/1)
June 27 2010
August 4, 2013
Subject: Model has no attributes???
Here is my model...
class Order extends ActiveRecord\Model {
public static $table_name = "orders";
public static $primary_key = "o_key";
}
When I do this...
$myOrder = new Order();
$myOrder->o_key = $new_key;
I get the error...
Fatal error: Uncaught exception 'ActiveRecord\UndefinedPropertyException' with message 'Undefined property: Order->o_key
Any insight or other questions needed to diagnose would be much appreciated.