Fix problem with STI: since the generated remote classes extend the original ones, the condition automatically included in queries was wrong