-->
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: Problem with org.hibernate.hql.ast.ASTQueryTranslatorFactory
PostPosted: Tue May 15, 2007 7:57 am 
Newbie

Joined: Fri Aug 04, 2006 12:27 pm
Posts: 14
Hi,
My application generates bug when I use
org.hibernate.hql.ast.ASTQueryTranslatorFactory. The exception is
Code:
org.hibernate.QueryException: could not resolve property: bholding of: com.bholding.model.domain.Company [SELECT count(*) FROM com.bholding.model.domain.Company AS com WHERE com.name_fr = 'TMASOLUTION' AND com.comId IN(SELECT ad.company FROM com.bholding.model.domain.Address AS ad WHERE upper(ad.street) like '%ALBERT%' )]
   at org.hibernate.persister.entity.AbstractPropertyMapping.throwPropertyException(AbstractPropertyMapping.java:43)
   at org.hibernate.persister.entity.AbstractPropertyMapping.toType(AbstractPropertyMapping.java:37)
   at org.hibernate.persister.entity.AbstractEntityPersister.toType(AbstractEntityPersister.java:1265)
   at org.hibernate.hql.ast.tree.FromElementType.getPropertyType(FromElementType.java:279)
   at org.hibernate.hql.ast.tree.FromElement.getPropertyType(FromElement.java:372)

bholding is just the name of a folder, nothing to see with the property of classes such as Company or Address. If I use org.hibernate.hql.classic.ClassicQueryTranslatorFactory, this exception does not occur.
Please let me know if you have any idea about this problem.
I use Hibernate-3.1.3.jar and antlr-2.7.5H3.jar. I have tried with the most recent versions of Hibernate and Antlr.
Thank you in advance.
Tvan


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 15, 2007 11:11 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
I suggest changing the name of your alias from "com" to anything else. The parser can't tell the difference between com the package and com the alias.

_________________
Code tags are your friend. Know them and use them.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 16, 2007 8:09 am 
Newbie

Joined: Fri Aug 04, 2006 12:27 pm
Posts: 14
Hi Tenwit,
It is great from you to see this problem. I have changed the name of the alias and it is OK now.
Thank you a lot
Best wishes
Tvan


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.