[SOLVED] Problem updating Image property

Good evening, I have added an Image to a Model like this:

/**
 *
 * @var \TYPO3\Media\Domain\Model\Image
 * @ORM\OneToOne(cascade={"persist"})
 */
 protected $thumbnail;

It works fine when I create new records but if I try to update such an image the problem is that it throws an integrity constraint violation.

SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (passcreator-local.typo3_media_domain_model_asset, CONSTRAINTFK_B8306B8EBC91F416FOREIGN KEY (resource) REFERENCEStypo3_flow_resource_resource(persistence_object_identifier))

Basically the upload looks like this:
<f:form.upload id=“thumbnail” property=“thumbnail.resource” />

Do you guys know how to update these images?

Same here. I just tried to update from flow 2.3 to 3.0 but i had no success.

Hi Benedikt,

I had one are were I was creating a thumbnail and then trying to save that thumbnail’s resource instead of the original resource.
That was what caused the problem in my case. I’ve now removed that and try to figure out a better solution.

Regards,
David

Thanks @bwaidelich
Forgot to update the title.