Add method setAttributes to avoid loss of Product attributes