-->
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: Access entities in multiple databases one instance with 1 qr
PostPosted: Tue Sep 29, 2009 8:55 am 
Newbie

Joined: Thu Jul 17, 2008 11:48 am
Posts: 4
Hi,

I have a problem for which I can not find a sollution in Google / books.

I have an informix server which holds 2 databases.
Some entities I want to select from one database and others from the second database. There is also relation between the tables.
Within informix SQL it is possible to

select * from table1,otherdatabase:table2 where table1.name=table2.name

How can this be done in hibernate, using annotations (I am working with Seam) with one entitymanager?


Top
 Profile  
 
 Post subject: Re: Access entities in multiple databases one instance with 1 qr
PostPosted: Tue Sep 29, 2009 9:18 am 
Newbie

Joined: Thu Jul 17, 2008 11:48 am
Posts: 4
One possibilty is to use the following method:
@Entity
@Table(name="otherdatabase:table")
public class Table {


but now I can not use Hibernate validator....


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.