We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Multi-tiered relationships between models

I have three database tables, settings, webmaster and processes.

The first two have a HasMany/BelongsTo relationship. The latter two have a HasOne/HasOne relationship.

When using my Settings model, I can reach records within Webmaster using settings.webmaster.id, for instance. However, how can I reach Processes?

Using settings.webmaster.processes.name for instance, doesn't seem to work.

Don't forget that HasMany will produce a collection of models, so you'll have to access them like so: