Magnetism and superconductivity in rare earth-nickel-borocarbides