Preheat the oven to 240°C, gas mark 9. Heat the oil and butter in a frying pan and soften the onions, stirring frequently, for 10 minutes. Add the sausagemeat and chopped apple to the pan; use a wooden spoon to break up the sausagemeat into small pieces. Cook with the onions for 10 minutes over a medium heat, stirring. Add the chopped rosemary and leave to cool.