org.hibernate.hql.internal.ast.QuerySyntaxException: b_organization is not mapped
源代码是:

其中b_organization是数据库的表名
报错如下:
org.hibernate.hql.internal.ast.QuerySyntaxException: b_organization is not mapped
错误原因及解决办法:
【tableName】 不要写你要查询的表,而是查询的对象
【table字段】不要写表中字段,而要写对象的属性
并且在@Query注解上加上@Modifying注解
修改如下:

这样就正确了

浙公网安备 33010602011771号