Open rsereir opened 1 year ago
Hello @rsereir , If you use API PLATFORM 3 you can to use state processors to perform any operation before saving in the database.
@kevinG73 hello !
Thanks for your answer, but i really want to know why i loss my translation id on update translations :)
Make a custom state processor is working if i rewrite all of validation process, all of translation persistance, but i just want to use properly UniqueEntity constraint of symfony, without custom state process, it's just a "classic" api call.
hello !
i try to add unique constraint on my translations with name + locale fields to not have duplications on my translation entities but when i try to remplace my
translations
collection of my translatable entity without any modifications, my constraint is trigged because doctrine try to add new translations ( instead of update existing ).I analyse the unique constraint validator of symfony and i see i loss my
id
on translations objects whenvalid
is called. someone have any idea ?Rédoine