Ferromagnetic–antiferromagnetic transition in double perovskites