james roberts Sat Sep 04 15:25:49 -0400 2010

Subject: Cant get it setup - error message - undefined property - using quick guide

Hello all,

i would be extremely grateful if you could help me with my problem,
i cant seem to complete the quick guide.

i am using
PHP Version 6.0.0-dev

i set up the db connection and that works.
i create my empty user class and put it in model directory
i set the directory for the models and that works.

it seems to fail on this line of code:
$user = User::create(array('name' => 'Tito', 'state' => 'VA'));

i get this error message:-

Fatal error: Uncaught exception 'ActiveRecord\UndefinedPropertyException' with message 'Undefined property: User->name in /homepages/40/d242703152/htdocs/etreeweb/models/php-activerecord/lib/Model.php on line 430 Undefined property: User->state in /homepages/40/d242703152/htdocs/etreeweb/models/php-activerecord/lib/Model.php on line 430' in /homepages/40/d242703152/htdocs/etreeweb/models/php-activerecord/lib/Model.php:1068 Stack trace: #0 /homepages/40/d242703152/htdocs/etreeweb/models/php-activerecord/lib/Model.php(359): ActiveRecord\Model->set_attributes_via_mass_assignment(Array, true) #1 /homepages/40/d242703152/htdocs/etreeweb/models/php-activerecord/lib/Model.php(740): ActiveRecord\Model->__construct(Array) #2 /homepages/40/d242703152/htdocs/etreeweb/index.php(27): ActiveRecord\Model::create(Array) #3 {main} thrown in /homepages/40/d242703152/htdocs/etreeweb/models/php-activerecord/lib/Model.php on line 1068

hope you can help.



Jacques Fuentes Tue Sep 07 20:18:08 -0400 2010

Would you paste your user table schema?