size « Property « JPA Q&A





1. Limit size of property    forum.hibernate.org

Hi, I'm facing the following problem: Class A owns a set (called "entries) and now I want to limit the size of the set when querying the Class. E.g. if the set has 20 entries in the database, I want to be able to retrieve only record 15 to 17. I tried it with the following, but the setFirstResult (and setMaxResults) ...