[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Same query doesn't work on jboss-4.0.5.GA

andydale do-not-reply at jboss.com
Thu Jan 11 11:06:53 EST 2007


Hi Andreas,

First off you need to open the offending class (org.hibernate.hql.ast.tree.FromClause) and then locate addDuplicateAlias method, and then just put the fromElementByClassAlias.put( alias, element ); call into an if statement like so:


  | void addDuplicateAlias(String alias, FromElement element) { 
  |         if(alias != null) {
  |             fromElementByClassAlias.put( alias, element );
  |         }
  | }
  | 
This solution has not been verified by the hibernate people, but if you look in the method above addDuplicateAlias(registerFromElement) they always perform the hashmap.put() calls in an if statement checking that the "key" (classAlias) is not null.  This got rid of my problem, hopefully it should do the same for you.

After you have modified the source, rebuild with ant,  i would use the target "jar" or "dist"

Let me know how you get on with it.

Cheers,

Andy

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4000511#4000511

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4000511



More information about the jboss-user mailing list