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

Models relationship

Is it possible to create a relationship between models that have different connection? Thanks in advance!



1.7k
Accepted
answer

Hi! Thanks for your comment and suggestion. I finally manage to do it. All you need to do is make sure that you initialize your model with the correct database connection and proper namespace of the Model Class you're creating relationship with.



1.7k

No sir, I haven't tried it.

You are creating a relationship but is capable of joining with PHQL?