[hibernate-issues] [Hibernate-JIRA] Created: (HHH-4579) query.setMaxResults causes com.mysql.jdbc.exceptions.MySQLSyntaxErrorException
Phil Russell (JIRA)
noreply at atlassian.com
Mon Nov 16 22:25:08 EST 2009
query.setMaxResults causes com.mysql.jdbc.exceptions.MySQLSyntaxErrorException
------------------------------------------------------------------------------
Key: HHH-4579
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4579
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.3.1
Environment: MySql 5.1.37 hibernate-entitymanager-3.3.1.ga
Reporter: Phil Russell
Can't setMaximumResults() on a query -
e.g.
public List<Hotel> findHotels() {
int maxRecords = 10;
int startPosition = 0;
Query query = em.createQuery("select h from Hotel h where h.name = 'W Hotel'");
query.setMaxResults(maxRecords); // if this line is removed, no error occurs
query.setFirstResult(startPosition);
List<Hotel> hotelList = query.getResultList();
return hotelList;
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list