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, a second absorbent adhesive composition, and a release liner.