使用JPAUpdateClause更新收集字段

我正在尝试使用以下

更新“设置类型”字段
/etc/ssh/sshd_config

但出现以下错误

    final QFooEntity fooEntity = QFooEntity.fooEntity;
    final JPAUpdateclause updateclause = new JPAUpdateclause(entityManager,fooEntity);
    updateclause.where(fooEntity.id.in(ids))
                .set(fooEntity.barIds,barIds)
                .execute();

我可以毫无问题地更新常规字段,所以我认为这是因为barIds是一个Set

这是实体

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'set .=. where id in ...

使用JPAUpdateclause是否可能,或者我必须编写自己的sql字符串?

chenxiaodan19881018 回答:使用JPAUpdateClause更新收集字段

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3049360.html

大家都在问