kliver / hibernate-generic-dao

Automatically exported from code.google.com/p/hibernate-generic-dao
0 stars 0 forks source link

process collection fields from queries #32

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
HQL like these:
select h.id, h.residents from Home h

select p.id, elements(p.limbs) from LimbedPet p

return a row for each collection element. We could post-process these 
results to return a Collection for the field instead.

For example, if a query returns:
ID, LIMBS
 1, "front"
 1, "back"
 2, "left"
 2, "right"

process the results and return:
ID, LIMBS
 1, ["front", "back]
 2, ["left", "right"]

Original issue reported on code.google.com by dwolvert on 19 May 2009 at 3:02