Working with Shards a few days now, I am really surprised how good it is already working.
Think I found a litte bug in ShardedQueryImpl.setMaxResults.
I make a query like this:
Code:
List<Person> persons = HibernateUtil.getSession()
.createQuery("from Person")
.setMaxResults(1)
.list();
The list contains 3 person objects. One from every configured shard. That's not what I would expect?!
setFirstResult seems to behave correctly.
// Edit:
For criteria query there is no problem. Too bad I cannot use it, because I need property projection which is unsupported in the moment.