How can I use multiple connections with relation functions
alexandrusavin opened this issue · comments
I made a simple patch that solves a problem that I stumbled upon while working with multiple connections.
I have relations through different databases and thus I have a lot of connections configured but when I tried to create the helper functions (in the model classes) for this relations I was getting "unknown PDO driver" error caused by the self::factory function, used in _has_one_or_many. It was using the default connection so I guess it should also get a variable for the connection name.
Here is a gist with the patch: https://gist.github.com/savinzoobe/5364083
Am I doing something wrong or is this really an issue?