-->
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: hql
PostPosted: Wed Jun 01, 2011 3:55 pm 
Newbie

Joined: Wed Jun 01, 2011 3:48 pm
Posts: 1
Bonjour je souhaite votre aide je suis débutant en HQl
J’ai deux classe Article et VoteArticle

La classe Article
Code :
Code:
public class Article {
public int id;
private List<VoteArticle> listvoteArticle;
……
}


Mapping

Code:
   <list fetch="join" lazy="false" name="listvoteArticle">
      <key column="listvoteArticle_ID"/>
      <list-index column="IDXvote"/>
      <one-to-many class="beans.VoteArticle"/>
    </list>


Pour la classe VoteArticle
Code:
Public  class VoteArticle {
private int id;
private int  nbJaime;
….
}

Je souhaite sélectionner les article et ordonne les enregistrements trouvés dans l'ordre décroissant de leur valeur pour le champ NBJAIME qui existe dans classe VoteArticle

Voici La requête sql

Code:
select * from ISALAAAAMCHENOSOUAMA.TVOTEARTICLE , TARTICLE where TVOTEARTICLE.LISTVOTEARTICLE_ID=TARTICLE.ID  ORDER BY NBJAIME DESC;


Mais j’ai essaie de traduire en langage HQL toujours il y a des problème .
Je souhaite votre aide
merci


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.