Thursday, September 24, 2009

Pagination on the object which is the “many” in a one-to-many relationship ?

Here is the scenario. We have objectA contains a list of objectB, a standard one-to-many relationship. But each objectA has millions objectB and we don’t want to load all of them each time we load the objectA. The UI need load one objectA and the first 100 objectB and has the pagination button to see previous/next 100 objectB records.

Can lazy load work for pagination?

What happens if only the properties of objectA are updated? when the object is updated on UI and sent back to dao to do the updating, objectA only contains 100 objectB, will the persistence engine delete all the other objectB?

related articles on internet

No comments:

Post a Comment