1. Combine the water, vinegar, sugar and spices in a saucepan and bring to a boil.
2. Slice the onion into thin strips and add to the saucepan along with the pineapple. Simmer until the pineapple is tender. It will take around 20 minutes over medium heat.
3. Combine the cornflour with 2 tbsp of cold water.
4. Add this to the pineapple mixture and boil until it starts to thicken. If the pineapple is not cooked until mushy, you can give it a quick whiz with a handheld blender.
5. Allow the relish to cool before serving with bread and cheese.