row-level-role 生成jpql

row-level-role 的child role 的policy用and 串联 jpql,以后是否有计划增加用 or 串联 jpql
想要row-level-role 获取实体结果的并集,而不是限制条件的并集

你好,能举个例子吗?因为现在 row level role 的 where 是支持 or 的,比如可以这么写:

@JpqlRowLevelPolicy(
        entityClass = User.class,
        join = "left join {E}.department dept",
        where = "dept is null or dept.hrManager.id = :current_user_id")
void user();

然后,你可以设置 logging.level.eclipselink.logging.sql = debug查看输出的 sql。

想要支持不同的role 可以 or 串联 例如:
row-level-role-A: {E}.username = ‘A’
row-level-role-B: {E}.username = ‘B’
user assignRole A+B sql 结果
当前:null
期望:两条记录,‘A’,‘B’ 都能显示

明白了,这个确实不支持。现在暂时只能手动配置这个类似 A+B 的角色了。

issue created on Github: https://github.com/jmix-framework/jmix/issues/1457