Hello, In my app I use custom sql query builder and
$result = new MyModel();
$results = new \Phalcon\Mvc\Model\Resultset\Simple(null, $result, $result->getReadConnection()->query($sql));
to get results in one case and
$results = MyModel::find([ some category parameters])
in another case. Columns are the same in both cases and I use the same partial to display results. I have some constant public properties in Model class declaration.
class MyModel extends BaseModel {
public $property_1="MyProp1";
public $property_2="MyProp2";
....;
In first case I can access my properties from each resultset row ( what I need to display my results properlly) , in second case I have only database columns-properties and seems like no model instance has been created. Maybe it's normal behaviour but how do I set my properties and make them accessible in second scenario then?