Hi,
I am a newbie to Hibernate.
I searched for paging in this forum and came with a lot of hits, sorry if this has been answered already.
In my Seam page, I display a list of records from a table called Tax which has a One-To-Many with a table called Item
So in my Tax entity class, I have
Code:
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tax")
public Set<Item> getItems() {
return this.items;
}
On my Tax list page, I use a EntityQuery backed list with paging controls which use firstResult parameter to limit the rows.
When I click a tax on the list page, I now display a list of associated items.
So Hibernate will fire the query getItems() above.
My problem is how do I limit rows returned from getItems() and having paging controls for it. I can't do setFirstResult() and setMaxResults() ?
thanks for any guidance.
Regards
Franco