-->
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: hql problems
PostPosted: Mon Sep 12, 2011 4:46 pm 
Newbie

Joined: Wed Feb 10, 2010 8:42 pm
Posts: 3
I have a namedquerie :

@NamedQuery(name=JuntaPreEnsamble.QUERY_ESTRUTURA_JUNTA_PREENSAMBLE, query=" from CorteBiselado as cb left join cb.estruturaPlano as ep where "+
" ep.fabrica= :fabrica " +
" and ep.posicaoMargem= :posicaoMargem " +
" and ep.modulo= :modulo " +
" and ep.subModulo= :subModulo " +
" and ep.tramo= :tramo " +
" and ep.componente= :componente " +
" and ep.elemento = :elemento " +
" and ep.posicaoElemento = :posicaoElemento")

This sentence is returning entities "CorteBiselado" and "EstruturaPlano" ...

I wish the sentence returns only the entity "CorteBiselado"


How could I make a sentence?


Top
 Profile  
 
 Post subject: Re: hql problems
PostPosted: Mon Sep 12, 2011 5:56 pm 
Newbie

Joined: Mon Sep 12, 2011 2:09 pm
Posts: 2
diogossh wrote:


...
@NamedQuery(name=JuntaPreEnsamble.QUERY_ESTRUTURA_JUNTA_PREENSAMBLE, query=" from CorteBiselado as cb left join cb.estruturaPlano as ep where "+
...


You should try:

query="select ep from CorteBiselado as cb left join cb.estruturaPlano as ep

att,


Top
 Profile  
 
 Post subject: Re: hql problems
PostPosted: Tue Sep 13, 2011 8:18 am 
Newbie

Joined: Wed Feb 10, 2010 8:42 pm
Posts: 3
thanks ,,,, work well


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.