How to do addAll from multiple sql result in hibernate?
I'm running sql seperately, because hibernate doesn't support "union". So
how to do addAll from those results.
public List<Product> findlist(String pid) {
List <Product> result1 ;
List <Product> result2;
Object[] obj = {pid};
result1.add(findAllByQuery(PRODUCT_DIVISION1,obj));
result1.add(findAllByQuery(PRODUCT_DIVISION2,obj));
return result1.addAll(result1);
}
PRODUCT_DIVISION1 = "query"; PRODUCT_DIVISION2 = "query";
Please advise.
No comments:
Post a Comment