I don't know if that would work either, and it's *very* brittle/error-prone.

It would be a trivial operation to create a proper mapping from the Object[]
to something that has actual *meaning*, or to use Hibernate in a more
rational way, and eliminate the problem.

Dave

On Thu, Dec 23, 2010 at 7:18 PM, Oscar <[email protected]> wrote:

> Hi to all, right now i'm working with Struts 2 application and Hibernate
> JPA. Hibernate let developers to run native queries, but the results are
> returned in form of List<Object[]>. So, i'm getting one of these lists in
> my
> action and i want to use it to populate <s:select> , but i don't know how
> it
> works when i use a list of object array. I know that, when i have a list of
> object that contains properties with their respective getters and setters
> you only specify the name of property that will be the listKey and the
> property that will be the listValue, but in this case aren't objects with
> properties, is an array of object, so i think that i have to specify the
> index that will be listKey and listValue, but i don't know if that's
> possible.
>
> Regards.
>
> --
> Oscar Calderón
> SCJP 6  <http://javahowto.net>
>

Reply via email to