-->
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: Syntax '[]' (map collection) seems not work in subselects.
PostPosted: Fri Jan 23, 2009 12:17 pm 
Newbie

Joined: Fri Jan 23, 2009 11:57 am
Posts: 1
Hi,

It seems like a bug :(

The syntax '[]' seems not to work in subselects.

NHibernate version:2.1.0

Example1:
Code:
from DTO_ProcessoHistorico dto 
where exists   
(
   select distinct processo.IdBD       
   from DTO_ProcessoHistorico processo,           
   InstanciaDeProcesso instancia ,
   ValorTextual as valor       
   where processo.IdDoProcesso = instancia.IdBD and           
                instancia.ValorDosAtributos.Valores['nomeDoAtributo'].Texto = 'valorDoAtributo'
) order by dto.CodigoDoProcesso asc


OR

Example2:
Code:
from DTO_ProcessoHistorico dto 
where exists   
(
   select distinct processo.IdBD       
   from DTO_ProcessoHistorico processo,           
   InstanciaDeProcesso instancia ,
   ValorTextual as valor       
   where processo.IdDoProcesso = instancia.IdBD and           
                instancia.ValorDosAtributos.Valores['nomeDoAtributo'] = valor and valor.Texto = 'valorDoAtributo'
) order by dto.CodigoDoProcesso asc


Both examples have the same behavior.

Exception:


NHibernate.QueryException: unexpected [ [from FPwWorkflow.Compartilhados.DTO.DTO_ProcessoHistorico dto
where exists
(
select distinct processo.IdBD
from FPwWorkflow.Compartilhados.DTO.DTO_ProcessoHistorico processo,
FPwWorkflow.Server.GerenciadorDeProcessos.InstanciaDeProcesso instancia ,
FPwWorkflow.Compartilhados.GerenciadorDeConceitos.Implementacoes.ValorTextual as valor
where processo.IdDoProcesso = instancia.IdBD and
instancia.ValorDosAtributos.Valores['nomeDoAtributo'].Texto = 'valorDoAtributo'
) order by dto.CodigoDoProcesso asc]
em NHibernate.Hql.Classic.WhereParser.Token(String token, QueryTranslator q)
em NHibernate.Hql.Classic.ClauseParser.Token(String token, QueryTranslator q)
em NHibernate.Hql.Classic.PreprocessingParser.Token(String token, QueryTranslator q)
em NHibernate.Hql.Classic.ParserHelper.Parse(IParser p, String text, String seperators, QueryTranslator q)
em NHibernate.Hql.Classic.QueryTranslator.Compile()
em NHibernate.Hql.Classic.QueryTranslator.Compile(IDictionary`2 replacements, Boolean scalar)
em NHibernate.Engine.Query.HQLQueryPlan..ctor(String hql, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory)
em NHibernate.Engine.Query.QueryPlanCache.GetHQLQueryPlan(String queryString, Boolean shallow, IDictionary`2 enabledFilters)
em NHibernate.Impl.SessionImpl.GetQueries(String query, Boolean scalar) em Ayende.NHibernateQueryAnalyzer.Core.Model.Project.HqlToSql(String hqlQuery, IDictionary parameters)
em Ayende.NHibernateQueryAnalyzer.UserInterface.Presenters.QueryPresenter.TranslateHql()


[/code]


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.