-->
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: Two dependent beans on separate servers and databases
PostPosted: Thu Feb 17, 2011 10:06 am 
Newbie

Joined: Sat Dec 11, 2010 8:49 am
Posts: 19
Hello,

I have following situation:
Users table is on one mysql server in Users database, and user profiles table is
on another mysql server in UserProfiles database so i have two tables in two
different databases on two different servers (machines).
Mapping file for users table is users.xml and for user profiles table is
userProfiles.xml. In userProfiles.xml i have many to one association to user table like:
<many-to-one name="user" class="User" lazy="proxy" fetch="select" property-ref="userId">
<column name="UserID" not-null="true" />
</many-to-one>

Is this supported by hibernate?

I know that i can use two separate session factories and create two separate sessions to work
with this two databases but i don't want to have both tables on both databases.


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.