Combine the water, vinegar, sugar and spices in a saucepan and bring to a boil. 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.
Combine the cornflour with 2 tbsp of cold water. 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. Allow the relish to cool before serving with bread and cheese.