Adding toArray() and toJSON() to TActiveRecord