Open kuzukuzu opened 6 years ago
i agree. the approaches were unified in my experimental branch. I'll be beginning to draw things across from that the next few weeks once we've confirmed that it's stable.
as it happens, i settled on the connection method. this way, the same separate connection is used for all excluded models (and it works with multi-host set ups).
There is a serious issue with prefixing table_name
.
ActiveRecord
uses it here to get additional data while building WHERE
queries.
If proper association cannot be found and related data (which might include custom serialization) is missing, we end up with broken query.
See related Rails issue https://github.com/rails/rails/issues/35839
Hi,
I have a question about the process of "excluded models".
I've read the initialization process, and noticed that
process_excluded_model
behaves different in each adapters.mysql2 and postgres adapters process "excluded models" with prefixing
table_name
. On the other hand, other adapters (including abstract adapter) process them with callingestablish connection
.I think former approach is better because of it's lightness. So the question is why are there two different ways to treat "excluded models" ?