[jboss-user] [EJB 3.0] - Best Practice Pagination with OneToMany Mapping
Cy23
do-not-reply at jboss.com
Mon Aug 6 06:16:18 EDT 2007
hi there,
a LinkRubric has many Links.
Its mapped like this:
| @OneToMany(cascade = { CascadeType.ALL },
| fetch = FetchType.LAZY, mappedBy="linkRubric")
|
i can get out a LinkRubric with that statment:
| SELECT p
| FROM LinkRubric p
| WHERE p.topRubricID = '5'
|
I put "Lazy Loading" to on, so my links are loaded when this object is beeing accessed. However, i don't want to load all that links at once. My cleint gives me the page and the max_links_per_page params, and i want to limit the size of the links.
Does anyone have an idea about how to realize this?
thanks,
chris
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071103#4071103
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071103
More information about the jboss-user
mailing list