couldnotresolveproperty:nameof:

2015-02-03 10:06:00 · 作者: · 浏览: 14

spring date jpa 错误:could not resolve property: name of:

在写 查询的时候,把实体类的属性写错了,即 sql 语句中字段与实体类中属性没有对应,造成无法解析。

@Query("from Product p where p.id.productName like :name")
	List getInfoByName(@Param("name")String name,Pageable pageable);
其中,把 id.productName 写成 name了

?