const data = {
orders: { }, // а коллекция не обнуляется-(
isBool: true //это меняеется
};
const result = await axios.patch(url, data, apiConfigPatch);
* @ORM\Entity(repositoryClass=SessRepository::class)
* @ApiResource(
* collectionOperations={
* "get"={
* "normalization_context"={"groups"="sess:list"}
* },
* "post"={
* "normalization_context"={"groups"="sess:list:write"},
* "security_post_denormalize"="is_granted('SESS_EDIT', object)"
* }
* },
* itemOperations={
* "get"={
* "normalization_context"={"groups"="sess:item"},
* "security"="is_granted('SESS_READ', object)"
* },
* "delete"={
* "security"="is_granted('SESS_DELETE', object)"
* },
* "patch"={
* "normalization_context"={"groups"="sess:item"},
* "security_post_denormalize"="is_granted('SESS_EDIT', object)"
* }
* }
* )
*
*/
class Sess
{
/**
* @ORM\OneToMany(targetEntity=Orders::class, mappedBy="sess", cascade={"persist", "remove"})
* @Groups({"sess:list", "sess:item"})
*
*/
private $orders;