opened
bitdevelopment
username_0
### What steps will reproduce the problem?
1. Having AnySQL (MySQL, SQL or any similar dbo) table that is relational to data in sphinx.
### What's problem?
It can be many relational tables, that are not having search query data, but needs to be presented along with results from sphinx. 
Current effective workaround is to fetch models/array of data from sphinx, pull column with `ArrayHelper`, and select relational tables from other database.
Snippets are not so good in this as they are having too many calls which defies a reason for `eagerLoading`

### What would be desirable?
It would be desirable if `yii\sphinx\ActiveQuery::with()` can accept `yii\db\ActiveQuery` results, and in other cases (joinWith, innerJoinWith, etc...) raises error that relation cannot be called.

Other option would be to add another method that would handle this case. like `withSQL()` or similar.

### Additional info
I think this issue is not related only to `sphinx<=>SQL` but to `AnySQL1<=>AnySQL2`, but with sphinx it can become a nightmare when refactoring is needed. 

I'd like to help and solve this, as I setup dev environment now, just first to get references from you guys how you look at this.
Enhancement of `with()` relation
issue
created
samdark
username_1
`with()` is accepting AR relations only by design and it's not a good decision to extend it they way you are suggesting. For your case I think you need to create SQL view, a model for it and then use it in `with()`.
comment
closed
samdark
username_1
issue