Hi,
Suppose I have a table:
PostID int(10)
UserID int(10)
then I do:
fORMJSON::extend();
$post = new Post(1);
echo $post->toJSON();
I would like to add a field to the fActiveRecord that doesn't exist in the table, for example:
$post->addnodbfieldNewField();
$post->setNewField('Some value');
echo $post->toJSON();
Is there any way I can do that and get the new field in the json response?
I have solved my problem by extending my Post class but just want to know if there is a flourish way to do it.