Home > Database > Mysql Tutorial > couldnotresolveproperty:nameof:

couldnotresolveproperty:nameof:

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 16:12:21
Original
1186 people have browsed it

spring date jpa 错误:could not resolve property: name of: 在写 查询的时候,把实体类的属性写错了,即 sql 语句中字段与实体类中属性没有对应,造成无法解析。 @Query(from Product p where p.id.productName like :name)ListProduct getInfoByName(@Pa

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

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

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

 

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template