V
V
Victor2015-01-03 20:30:33
Java
Victor, 2015-01-03 20:30:33

How to load data in chunks (Spring+Hibernate)?

You need to load data from the database in batches. If there are a million records, then it will be hard. How do I load data in chunks. In the project I use Jpa (Hibernate) and Spring. There is an idea to do the following.
There is an interface that is responsible for communicating with the database (@Repository), in its implementation I work with EntityManager.
Maybe just add appropriate methods for partial data loading? Again, what methods to use for partial loading.
Please help me with this issue. (May be worth any hibernate features? Criteria type and HQL)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nikolai Pavlov, 2015-01-03
@davinctor

Chop SpringData, there is a beautiful solution with Pageable

A
anyd3v, 2015-01-03
@anyd3v

How is what you want different from normal spring hibernate pagination ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question