首页 > TAG信息列表 > nativeQuery

006 在jpa中,@Query使用limit时出错

错误提示: java.sql.SQLSyntaxErrorException: 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 'order by ol.createTime desc' at line 1 显示:   翻译:     错误说明:jpa中使用@Quer

JPA 下使用原生sql,参数传递及使用方式以及JPQL参数传递使用方式

原生sql 参数为对象 @Query(value = "select * from user_info where username = :#{#user. username} , nativeQuery= true) User findByUsername(User user); 参数为变量,使用?获取 @Query(value = "select * from user_info where username = ?1 , nativeQuery = true) User fi