I want to clear a @Lob field from a Model.
In the model I have something like this for the image field:
@Lob
public byte[] image;
If I do something like this:
theModel.image = null;
theModel.update();
It doesn't remove the data from the field. I find this useful because not every time the model is updated (from a form) an image will be submited to modify the existing one.
But, what can I do to remove the image when needed? Is there an in-framework way to do this? WIll I have to update it "manually" (i.e.: sql...)?