users@glassfish.java.net

RE: CriteriaQuery and OrderBy

From: Joao Cabral <jcabral_at_orientacao-lda.pt>
Date: Tue, 16 Aug 2011 19:02:36 +0100

Date: Tue, 16 Aug 2011 18:27:26 +0100
Message-ID: <001d01cc5c39$c4e7ab30$4eb70190$_at_pt>
MIME-Version: 1.0
Content-Type: text/plain;
        charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: AcxcOuEFltukikaVRTiA6sPzSSlJngAAmCRA
Content-Language: pt


I=C2=B4m not an expert but I think the code is duplicated:

cq =3D cb.createQuery(Sydata.class);
Root<Sydata> sydata =3D cq.from(Sydata.class);
cq =3D cb.createQuery(Sydata.class); <----------------
cq.select(sydata);


I=C2=B4m having problems with order by whit complex keys (using =
embebedid). The sql is generated with errors (duplicate fields).
=20