Add joins option for complex query conditions.