Is it possible to create a relationship between models that have different connection? Thanks in advance!
I don't think that its possible to join between two tables on different databases. If you really need to do that then you might want to consider breaking up the schemas into a different way.
In my project I have an
org database and a
site database. The
Sites model is stored in the
org database and to access the service for the
site database a
Sites model must be first selected with
$site->select() or otherwise an exception will be thrown in the site service definition.
So then you have two different databases and basically you are going to need to do joins in PHP land. Maybe its not a big deal if the join is over a small array of values and the search was on an index. The Big-O runtime isn't going to be more and you will still have the same time on the searches and with just a small overhead of passing values around in your program. If its just dozens or maybe a hundred values and you know that it won't expand out to be thousands then its very neglible. If its just an administrative function then its not important at all.
No sir, I haven't tried it.
You are creating a relationship but is capable of joining with PHQL?