-->
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.  [ 2 posts ] 
Author Message
 Post subject: Named queries with parametertypes not in classpath
PostPosted: Tue Jan 10, 2006 4:38 am 
Newbie

Joined: Tue Jan 03, 2006 4:24 am
Posts: 4
Hi,

when defining queries in the hbm-file, you need to specify attributes by name and type

Code:
<query-param name="content" type="foo.Bar" />


Why is it so that type needs to be in classpath for the hbm2dao to work? In my case, the parameter is of a type that is about to be generated, and so this fails. I understand that hbm2dao calls hibernate to convert primitive types to classes, but couldn't non-primitive types just be used as they are written in the query-param declaration?

I could probably do this by first generating all pojo-s (the types that will be parameters), then compile them, then generate all dao-s. This is however not very convenient when building with maven.

Thanks!

Hibernate tools version:
3.1beta2
Hibernate version:
3.1
Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:
[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 10, 2006 5:38 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
it is a known limitation at the moment. don't know if I want to fix it since it can be done as you explain (by generating in 2 phases).

Just because maven can't or its hard to do with maven is not enough for me to fix it.

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.