-
-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get paginated results when fetching changes on multiple types? #1268
Comments
Hi @thinow. Is this a feature request? Are you proposing a new query method, sth like this ?
|
Hi @bartoszwalacik, Sorry for the delayed answer. If the latest version of javers does not support pagination on multiple instance types, then it is probably a feature request. Assuming the javers supports |
Javers supports pagination (skip and limit) for all queries |
Hello I am having the same issue. QueryBuilder.byInstances(List<?> instances) |
@thinow @Akayeshmantha implementing |
How to get the changes for multiple entity types ? Those types are all audited by Javers, and have one-to-many relationships. Furthermore, the search needs to be paginated (because of the big amount of data).
Let's consider the first type
Hotel
with a one-to-many relationship toRoom
.Hotel
has a second one-to-many relationship toRecommendation
.Currently, the search looks like the following. This implementation is not efficient since it fetches all data before reducing the result set to display a page.
Example of the entities:
Expected results: a list of changes ordered by date made of different types :
Side-note:
I'm aware of the methods
limit
andskip
on the classQueryBuilder
, but since I need to execute the search by instance, it won't paginate the results of multiple instance types.The text was updated successfully, but these errors were encountered: