I was following the Blog tutorial. At the Day4: Creating ListPostPage, I get this error message:
TActiveRecordException
Description
Unable to find PostRecord::$RELATIONS['author'], Active Record relationship definition for property “author” not found in entries of PostRecord::$RELATIONS.
The code: PostRecord.php:
public $author; //holds an UserRecord
protected static $RELATIONS=array
(
‘author’ => array(self::BELONGS_TO, ‘UserRecord’)
);
The solution is:
change the $RELATIONS to public:
public static $RELATIONS=array
(
‘author’ => array(self::BELONGS_TO, ‘UserRecord’)
);