Use select new A(a.attribute1, a.attribute2) from A a Create a constructor to accommodate the received parameters.
Em Terça-feira 28 Julho 2009, às 15:27:31, Jean-Baptiste BRIAUD -- Novlog escreveu: > Hi, > > If I use the following request SELECT a FROM A a, I got a List<A> > witch is perfectly fine. > If I use SELECT a.attribute1, a.attribute2 FROM A a, I got a > List<Object[]> where each List element is an array of 2 values for > attribute1 and attribute2. > > How can I have a List<A> where only attribute1 and attribute2 are set > instead of that List<Object[]> ? > > Thanks. > PS : I sent this message 3 hours ago but can't see it on the list... > so I decided to write this one. >