-->
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.  [ 4 posts ] 
Author Message
 Post subject: Where to put named queries when using Annotations?
PostPosted: Tue Feb 08, 2005 12:39 pm 
Regular
Regular

Joined: Thu Feb 19, 2004 4:48 am
Posts: 62
Are there any best practices where to put named queries when using annotations?

I'm a little bit lost here: As I don't have any <class>.hbm.xml anymore, I thought about creating a separate queries.hbm.xml and add it to the configuration.

But neither the hibernate-configuration-3.0.dtd, nor the hibernate-configuration-2.0.dtd contain the query element - so where shall I put my named queries?!

cheers
stefan


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 08, 2005 3:40 pm 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
what about putting it in a NamedQueries.hbm.xml ?

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 09, 2005 4:56 am 
Regular
Regular

Joined: Thu Feb 19, 2004 4:48 am
Posts: 62
Sorry, I got a little bit confused, I looked into the wrong dtd: The queries are specified in hibernate-mapping-3.0.dtd, not in hibernate-configuration-3.0.dtd.

yes, I just made up a NamedQueries.hbm.xml with my queries and added it to the configuration. Works fine.

thx
stf


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 10, 2005 1:01 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
I'm not sure putting named queries in annotation is a good practive. It will be possible however.

_________________
Emmanuel


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