You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is impossible to update the description of this created entity as it consistently returns the following response:
{
"@id": "/validation_errors/23bd9dbf-6b9b-41cd-a99e-4844bcf3077f",
"@type": "ConstraintViolationList",
"status": 422,
"violations": [
{
"propertyPath": "name",
"message": "This value is already used.",
"code": "23bd9dbf-6b9b-41cd-a99e-4844bcf3077f"
}
],
"detail": "name: This value is already used.",
"hydra:title": "An error occurred",
"hydra:description": "name: This value is already used.",
"type": "/validation_errors/23bd9dbf-6b9b-41cd-a99e-4844bcf3077f",
"title": "An error occurred"
}
Additional Context
It seems that the entity, which is being updated, is not fully loaded during validation. In the UniqueEntityValidator, there is this code to exclude its own
but $entity is not holding the id of the entity that needs updating.
Edit:
In the screenshot, it can be seen that I'm attempting to update the entity with an ID of "1".
Interestingly, the cause of failure is reported to be the same entity with an ID of "1".
If I'm not using the intended way, please let me know the correct method.
The text was updated successfully, but these errors were encountered:
API Platform version(s) affected: 3.2.18
Description
If you have a unique property in your entity it is impossible to update other properties with PUT
How to reproduce
Example entity:
It is impossible to update the description of this created entity as it consistently returns the following response:
Additional Context
It seems that the entity, which is being updated, is not fully loaded during validation. In the UniqueEntityValidator, there is this code to exclude its own
but $entity is not holding the id of the entity that needs updating.
Edit:
In the screenshot, it can be seen that I'm attempting to update the entity with an ID of "1".
Interestingly, the cause of failure is reported to be the same entity with an ID of "1".
If I'm not using the intended way, please let me know the correct method.
The text was updated successfully, but these errors were encountered: