Open buglinjo opened 5 years ago
up gan
Hi there, we want to write that for us all work fine in mysql with package cross-database.
In this query User are in DB1 and categories are in DB2. the result work great!
For us, we must specify relation connection ('database.relation') in :
And for User, we must replace Authenticatable with new model class:
Thanks for the trick :+1:
for me, it keeps doing the query in the wrong db
generic model: query: user model relation (users table on database1, roles and roles_user on database2) role model (database2)
error:
Undefined table: 7 ERROR: relation \"roles\" does not exist
Forget it, I removed the library and extended belongsToMany, it was easier. This library only was creating problems in other parts
Description:
Is there a way to make queries like
->whereHas('foo', function($q) { $q->whereHas('bar', ... ) })
work?Steps To Reproduce:
If I do:
everything works fine, but if I try this:
it is still using default connection.