-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
belongsTo
a different connection doesn't get picked up automatically
#17586
Comments
I do realise I'm reporting this for 3.10 which receives security updates only. Let me know if this got fixed in the newer versions? |
A workaround to get going:
|
This has not been fixed to my knowledge.
Are you expecting that the ORM will detect that the connection is not joinable and change the load strategy when the connection is defined at runtime? |
No no, that sounds too complicated, or I'm not understanding. Sorry about the confusion. Let me try to clarify.
|
So are you expecting that the ORM will cascade |
Only if and when it makes sense? Meaning:
|
This issue is stale because it has been open for 120 days with no activity. Remove the |
Description
What do I have
I have a table that uses a non-default connection. To make it worse, the connection name is a variable and is configured.
That table
belongsTo
another table in the same database. But neither table has the connection defined in the table class - because again, the connection name varies.What do I do
What I expect to happen
If the select strategy is join (the default), the other table is looked up within whatever datasource is set for the original table at the moment. (The original table is initialised with a
default
connection, which gets updated later usingsetConnection()
.)What actually happens
Related
CakePHP Version
3.10
PHP Version
5.6
The text was updated successfully, but these errors were encountered: