/** @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)"
* }
* }
* )
* @ApiFilter(ExistsFilter::class, properties={"orders.user"})
*/
class Sess
{
/**
* @ORM\OneToMany(targetEntity=Orders::class, mappedBy="sess", cascade={"persist", "remove"})
* @Groups({"sess:list", "sess:item"})
*
*/
private $orders;
....
}
не работает путь
/api/sess/1?exists[orders.user]=false