Hi,
I am using Hibernate version:3.0 and I have made a small function in a
standalone application to retrieve only some elements from the List in the following manner
Code:
public List getAllCustomers() {
List customerList = null;
getHibernateTemplate().setMaxResults(50);
customerList = getHibernateTemplate().find("from Customer c where c.password=?", "password");
System.out.println("No. of customers retrieved=" + customerList.size());
return customerList;
}
and it is working absolutely fine and returns only 50 records out of 1000 in the database.
But when I am using the
same function in another application that I am maintaining it returns me all the 1000 records. although setMaxResult has 50 as the parameter. Could you please tell me if maxResult() could be getting overridden by some configuration in the hibernate-properties or some other file.
In case you need any other information please let me know.
Thanks