Justice Minister Jim O’Callaghan says detention of children should be a last resort, but in some cases it is necessary.