Author: maulik
Date: 2007-03-29 18:10:22 -0400 (Thu, 29 Mar 2007)
New Revision: 11377
Modified:
trunk/HibernateExt/shards/src/test/org/hibernate/shards/integration/model/ModelQueryPermutedIntegrationTest.java
Log:
fixes bugs regard setMaxResults and setFirstResult on ShardedQueryImpl
Modified:
trunk/HibernateExt/shards/src/test/org/hibernate/shards/integration/model/ModelQueryPermutedIntegrationTest.java
===================================================================
---
trunk/HibernateExt/shards/src/test/org/hibernate/shards/integration/model/ModelQueryPermutedIntegrationTest.java 2007-03-29
22:10:03 UTC (rev 11376)
+++
trunk/HibernateExt/shards/src/test/org/hibernate/shards/integration/model/ModelQueryPermutedIntegrationTest.java 2007-03-29
22:10:22 UTC (rev 11377)
@@ -139,6 +139,20 @@
assertEquals(1, floors.size());
}
+ public void testSetMaxResults() {
+ String queryString = "from Floor";
+ Query query = session.createQuery(queryString).setMaxResults(1);
+ List<Floor> floors = query.list();
+ assertEquals(1, floors.size());
+ }
+
+ public void testSetFirstResultQuery() {
+ String queryString = "from Floor";
+ Query query = session.createQuery(queryString).setFirstResult(2);
+ List<Floor> floors = query.list();
+ assertEquals(2, floors.size());
+ }
+
public void xtestAggregating() throws Exception {
//TODO(maulik) make this test work
String queryString = "min(floor.number) from Floor floor";
Show replies by date