-->
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: Does Hibernate require sql queries to be in specific mapping
PostPosted: Wed Oct 26, 2005 9:32 am 
Newbie

Joined: Thu Mar 24, 2005 2:17 pm
Posts: 5
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.x

Does hibernate require sql queries to be in specific mapping files?

Consider the following scenario:
1. An application needs to be able to be used against different databases
2. Some queries are native sql queries (for performance reasons, etc)
3. There is a mapping file for a table called 'customer'

The native sql queries being different for different databases can these be
located in a seperate mapping file or does hibernate require the queries to be in the 'customer' mapping file only?


Top
 Profile  
 
 Post subject: Re: Does Hibernate require sql queries to be in specific map
PostPosted: Wed Oct 26, 2005 9:36 am 
Expert
Expert

Joined: Mon Feb 14, 2005 12:32 pm
Posts: 609
Location: Atlanta, GA - USA
Kasey wrote:
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.x

Does hibernate require sql queries to be in specific mapping files?

Consider the following scenario:
1. An application needs to be able to be used against different databases
2. Some queries are native sql queries (for performance reasons, etc)
3. There is a mapping file for a table called 'customer'

The native sql queries being different for different databases can these be
located in a seperate mapping file or does hibernate require the queries to be in the 'customer' mapping file only?


As long as the mapping files get defined to the Configuration prior to creating your SessionFactory, they can be in a file by themselves.

_________________
Preston

Please don't forget to give credit if/when you get helpful information.


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.