remove AR deprecation warning, when conditions declared on a relation