我的实体中有insert into table2(col_t2)
select val from (select 'r1' val from
dual union all
select 'r2' from dual)
where exists (select 'x' from table1
where some_criterium='some_value')
属性,我想根据用户角色定义不同的file
约束。
有什么想法吗?
答案 0 :(得分:0)
您可以将自定义约束用作服务并向其注入AuthorizationCheckerInterface:
https://symfony.com/doc/current/validation/custom_constraint.html