-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Selective HQL
PostPosted: Tue Sep 09, 2008 5:38 am 
Newbie

Joined: Mon Sep 01, 2008 3:41 am
Posts: 19
Hi,

I have this query but it not work. What is the problem?

What object return this query?

Code:
"select ci.id," +
            " ci.area," +
            " ci.nombre," +
            " ci.descripcionCorta," +
            " ci.fechaGrabacion" +
            " count(ci.logEjecucionInformes.id)," +
            " max(ci.logEjecucionInformes.fechaEjecucion)" +
            " from CabeceraInforme ci" +
            " group by ci.id," +
            " ci.area," +
            " ci.nombre," +
            " ci.descripcionCorta," +
            " ci.fechaGrabacion" +
            " order by ci.area," +
            " ci.nombre," +
            " ci.descripcionCorta," +
            " ci.fechaGrabacion");


Where can I find a good HQL Manual?

Thank you,

Praedos


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 09, 2008 5:44 am 
Expert
Expert

Joined: Fri Jul 13, 2007 8:18 am
Posts: 370
Location: london
I think you're missing a comma:
Code:
" ci.descripcionCorta," +
  " ci.fechaGrabacion" +      <-------- HERE
  " count(ci.logEjecucionInformes.id)," +


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 09, 2008 7:42 am 
Newbie

Joined: Mon Sep 01, 2008 3:41 am
Posts: 19
Yes but not is it. I wanted to get the max(fecha) of a list inside a CabeceraInforme Entity.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.