Disclosed is an ostomy device with an adhesive wafer for attachment to a skin surface of a user and a collecting bag for collecting output from a stoma. The collecting bag is connected to the adhesive wafer, and the adhesive wafer has a through-going hole for accommodating the stoma of the user. The adhesive wafer includes a backing layer, a first switchable adhesive composition (11), a second absorbent adhesive composition (12), and a release liner.