Jul 21st, 2012, 05:33 PM
Server-Side-Pagination and One-to-Many Relationship
I have 2 Classes (Class A & Class B) both Classes are mapped using jpa enity relationship. Class A has a "one-to-many" relationship with Class B (class A holds a list of class b objects). I would like to paginate the list within Class A so that only certain number of Class B objects is retrived from database. The pagination will ideally be server-side - had a look at "PagingAndSortingRepository" interface from Spring Data Pbkect Module. I am not sure if it would be possible to paginate the collection within Class A without having to paginate the entire Class A? Anyone have any suggestions?
Jul 26th, 2012, 08:59 AM
Maybe this can help you: http://stackoverflow.com/questions/1...ery-with-joins
I had the same problem, but I'm using Spring Batch.
Tags for this Thread