Brian Cain Thu Aug 15 00:52:10 -0400 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.


Brian Cain Thu Aug 15 00:53:41 -0400 2013

Sorry... I say "has not attributes" because when I do this....
echo count($myOrder->attributes()); ... I get a big fat zero!

(1-1/1)