Issue using Linkable across multiple databases.
It seems that the 'joins' syntax only supports specifying other databases by writing them manually into the 'table' field, for example:
'table' => 'other_db.users'
Linkable does not inject the database name into the 'table' query, so models which exist in different databases get queried out of the default database for the Model which is running the find query.
I believe this can be fixed by modifying line 152 of LinkableBehavior.php to:
$options['table'] = $_Model->schemaName . '.' . $_Model->table;
I've not tested this extensively but it appears to work within my application.
Any feedback would be appreciated.
That could work, another option is to call $datasource->fullTableName($model)... Are you able to provide a patch for this?
Yeah sure, should I just push it as a pull-request?