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.  [ 1 post ] 
Author Message
 Post subject: pb requete count
PostPosted: Tue Jun 20, 2006 4:03 am 
Newbie

Joined: Tue Jun 20, 2006 3:58 am
Posts: 1
Bonjour,
J'ai, dans mon code, une requete comme celle-ci :

Code:
list = hibernateSession.createSQLQuery(
                "select {e.*}, count(*) from Evolution as e group by e.ID_ETAT", "e",Evolution.class).list();
         


Cette requete me rend une liste d'objets 'évolutions'. Dès qu'il y a 2 évolution avec le meme 'id_etat', seule la premiere évolution est gardé dans la liste.

Comment puis-je faire pour que la requete me rende le nombre d'évolutions par état?
Merci d'avance


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

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.