-->
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.  [ 5 posts ] 
Author Message
 Post subject: XDoclet and named queries
PostPosted: Tue Dec 21, 2004 12:12 pm 
Newbie

Joined: Tue Dec 21, 2004 12:06 pm
Posts: 3
Hibernate version:
2.0

Using XDoclet, I can specify the class level tags

@hibernate.query name="myQuery" query="select...."

and the query gets added to the hbm file just fine. However I cannot find
any tags to specify the class to be used for instantiating objects returned
by the query.

Also, how do I merge custom queries into an hbm file. What should be the name of the merged file (i..e hibernate-query-MyCustomClass.hbm.xml?)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 21, 2004 1:05 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
i think xdoclet only has supports for named HQL queries - not native sql.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 21, 2004 1:26 pm 
Newbie

Joined: Tue Dec 21, 2004 12:06 pm
Posts: 3
Correction, I am trying to add named HQL queries. My queries are not
native SQL as I do have {} syntaxes in the table aliases.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 21, 2004 1:40 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
There is no need to specify a returned class for HQL queries.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 21, 2004 1:48 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
danwaters wrote:
Correction, I am trying to add named HQL queries. My queries are not
native SQL as I do have {} syntaxes in the table aliases.


eh - if you do have {} then you are using the feature named native sql queries in hibernate!

_________________
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.  [ 5 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.