Cześć,
Mam np. aukcje allegro.
Chciałbym z DB pobrać aukcje o id 1,2,3,4,5,6,7,8,9,10 i odpowiadające im opisy.
Czy i dlaczego, które rozwiązanie z punktu entity managera/DB jest lepsze:
1.
for(Int id : auctions) {
results.put(id,get(Clazz.class,id);
}
res = executeNativeQuery('SELECT id,opis FROM aukcje where ID in auctions');
for(Object[] : res) {
res.put(res[0],res[1]);
}