Fixed autoJoin with multiple conditions on the same relation