Code:
Query myQuery = session.createQuery("from LogDetail");
myQuery.setMaxResults(2);
List result = myQuery.list();
session.getTransaction().commit();
I having this in my code and i getting the following error
Code:
[java] Hibernate: select top ? logdetail0_.LOG_NUMBER as LOG1_0_, logdetail
0_.DATETIME as DATETIME0_, logdetail0_.level as level0_, logdetail0_.message as
message0_ from LOG_DETAIL logdetail0_
[java] 07 Jul 2006 14:37:06 [main] ERROR org.hibernate.util.JDBCExceptionRe
porter - 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 '2 logdetail0_.LO
G_NUMBER as LOG1_0_, logdetail0_.DATETIME as DATETIME0_, logdeta' at line 1
Any idea whats wrong with this?
Appreciate any help