-->
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: Hibernate x different databases
PostPosted: Fri Nov 18, 2005 3:20 pm 
Newbie

Joined: Fri Nov 18, 2005 3:15 pm
Posts: 2
Please, how can I make SELECT involving tables in different databases,
using Hibernate? Thanks!!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 18, 2005 3:26 pm 
Beginner
Beginner

Joined: Thu Aug 04, 2005 2:24 pm
Posts: 45
Don't believe you can do that, once you can have only one hibernate.cfg.xml per application and only one connection per file...

_________________
Eduardo Mylonas


Top
 Profile  
 
 Post subject: Re: Hibernate x different databases
PostPosted: Fri Nov 18, 2005 3:28 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
leila.carvalho wrote:
Please, how can I make SELECT involving tables in different databases,
using Hibernate? Thanks!!


You can only do it if your database supports joins across catalogs (many do).

In which case simply map the classes specifying an explicit catalog name.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 18, 2005 3:29 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
emylonas wrote:
Don't believe you can do that, once you can have only one hibernate.cfg.xml per application and only one connection per file...


You can have as many .cfg.xml files (and SessionFactory instances) as you like. But that it is not the solution to the problem.


Top
 Profile  
 
 Post subject: Gavin wrote
PostPosted: Fri Nov 18, 2005 3:44 pm 
Newbie

Joined: Fri Nov 18, 2005 3:15 pm
Posts: 2
"You can have as many .cfg.xml files (and SessionFactory instances) as you like. But that it is not the solution to the problem. "
--I know this HB´s feature, but it´s doesn´t solve my problem endeed.


"You can only do it if your database supports joins across catalogs (many do). In which case simply map the classes specifying an explicit catalog name. "
--Could you please be a bit more especific? Do you have a example?

Gracias !!


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.