-->
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: Help about designing multi-schema joins
PostPosted: Thu Feb 10, 2011 12:36 pm 
Newbie

Joined: Thu Feb 10, 2011 10:56 am
Posts: 1
Hi,

We are developing a system, which is a set of modules, each module has their schema (domain tables set) and their business java component. All modules need some information from the others.

The interaction in some cases is using webservices, but in another cases it's needed in data layer (multi-schema joins).

Example of modules are:
1. People central DB
2. Contracts Branch One (it needs info from people, it has very specialized business process and different data, the contract's objective is to refer a person.)
3. Contracts Branch Two (as above, the contracts are similar, but the items involves "build-houses" as real state, some person is the owner)
4. Contracts Branch Three (as above, the contracts are similar, but the items involves "cars", some person is the owner)
5. Invoice central (it needs data from people (holders/owners) and the Contracts modules (general info).

We've tryed mapping with hibernate, using @Table-schema, but every test it runs, it create a table in the foreign schema, and can't map a view because hibernate use it like a table.

It could be a good solution to have a non-persitent Entity to allow to map a table from a foreign schema in a join.
¿Is it exists something like that or a work-arounding solution?

Moreover, using named native queries, it's possible to map a multi-schema join, but the 'foreing' fields can't be mapped to transient fields. However, using that field a persistent-one, it works but it implies to add another local table, instead a view or table outside its schema.

¿Do you have a suggestion?

Thank you in advance for any tip or advice.

Fernando.


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.