I have two Queries:
Query1(pagable) first datasource
Query2(pagable) second datasource
I would like to do something like this
Page results = merge(query1, query2)
How i can do this in JPA ?
I have two Queries:
Query1(pagable) first datasource
Query2(pagable) second datasource
I would like to do something like this
Page results = merge(query1, query2)
How i can do this in JPA ?
Are both queries on the same entity? If so you can collect the content from both in a list (List<T> content) and build a new page object. Something as follows:
Page<T> mergedResult = new PageImpl(List<T> content);