Hi there,
I consume web service trough a rest API (mostly GET method <=> read data).
GET /country return ["1":"germany","2":"netherland", ...]
GET /size return ["1":"512MB","2":"1GB", ...]
GET /system/55 return ["id":"55","name":"beginner","country":"2", "size":"1", other properties]
I want a CountryModel ($id, $name), a SizeModel ($id, $size) and a SystemModel ($id, $name, $country_id, $size_id ...) , with relations between them (system hasOne size, system hasOne country ...)
What I want to achieve is something like: SystemModel::findFirst("55")->country->name
I imagine that I will have to use setter and getters for my models properties but how to query them and use relationships ???
Maybe implement something that will work like Interface Phalcon\Db\ResultInterface ???