我想用spring data rest来更新某些用户的行,但是在运行时这个查询有奇怪的“交叉连接”添加到查询中。创建spring data rest update产生交叉连接sql错误
春天数据休息方法
@Modifying
@Transactional
@Query("Update Notification n SET n.noticed = true Where n.notificationPost.owner.userId = 1 ")
public void postNoticed();
运行时间查询
Hibernate: update notification cross join set noticed=true where owner_id=?
我唯一担心的就是 “交叉连接” 添加为它提供了SQL错误
org.postgresql.util.PSQLException: ERROR: syntax error at or near "cross"
我打电话此方法直接由rest invoke调用,并且也来自mvc控制器,两种方式产生相同的错误
在此先感谢。
我们看一些实体的代码片段 – Blank