in method updateMaterial, the dao.read() was expecting an int value