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, CONSTRAINT
FK_B8306B8EBC91F416FOREIGN KEY (
resource) REFERENCES
typo3_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?