-->
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.  [ 1 post ] 
Author Message
 Post subject: Any ideas for named queries?
PostPosted: Mon Jan 21, 2008 9:43 pm 
Newbie

Joined: Mon Jan 21, 2008 9:30 pm
Posts: 1
We currently have some DAOs with MANY queries, all using private static final strings as the query text. We're trying to clean this up and make it easier to read, as well as more efficient. In doing so we've decided to use named queries. We are using hibernate 3.2 with annotations and Spring 2.0.2. It seems like our only option is to have a named query annotation at the top of the class. I guess I have two questions:

1. Is it possible to externalize these queries to another file other than an .hbm.xml as to not make the DAOs any bigger? (I should have mentioned that we have all of our classes mapped in the applicationContext.xml file)

2. Is there another way to externalize these queries to another file that we aren't thinking about?

Thanks in advance,
Mike


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.