Make relation queries go to slave

I'm not sure this is correct way to fix the issue, so any suggestions are appreciated.

Fixes #244.