According to an example aspect of the present invention, there is provided a method of joining objects of hydrophilic polymeric biomaterials. In the method, an ionic liquid is applied onto the surfaces of the objects; the surfaces are pressed together; and the ionic liquid is removed. The method produces a product that can consist to 100% of biomaterial, with no synthetic polymer or chemicals remaining in the product.