[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4579?page=c...
]
Phil Russell commented on HHH-4579:
-----------------------------------
Identified as not a bug. Was using the wrong dialect for Mysql 5. Dialect should have been
org.hibernate.dialect.MySQL5Dialect and was using org.hibernate.dialect.MySQLDialect
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira