jpa2.2.10 Query 使用entityManager构建sql查询返回Dto,实体类和Dto中都有set<实体类>,String hql = "SELECT NEW com.exampl避免这个问题 check the manual that corresponds to your MySQL server version for the right syntax to use near 'as col_9_0_, . as col_10_0_, . as col_11_0_ from user
时间: 2023-06-10 18:03:52 浏览: 98
Myeclipse自动生成注解实体类
4星 · 用户满意度95%
entity u WHERE u.id = :id";
Query query = entityManager.createQuery(hql);
query.setParameter("id", 1L);
List<Dto> dtos = query.getResultList();
请问,这段代码会返回什么结果?有什么问题吗?
阅读全文