【发布时间】:2011-03-31 09:06:29
【问题描述】:
编写此 JPA 查询的正确方法是什么?我只是猜测,因为我无法解决或在我的 JPA 书中找到它。
Query query=em.createQuery("select m from Meeting m where count(m.attendees) = 0");
return query.getResultList();
我目前正在使用 Hibernate 尝试此操作,但出现 mysql 错误!
ERROR org.hibernate.util.JDBCExceptionReporter - 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 ')=0' at line 1
【问题讨论】:
标签: java hibernate orm jpa jpql