Senior |
![Senior Senior](./images/ranks/senior.gif) |
Joined: Tue Jan 11, 2005 5:03 pm Posts: 137 Location: Montreal, Quebec
|
Hi,
I have search the forum for this topic but I havent found any data on it.
I would like to know if there is a way to have have a "unique" Hibernate persistence layer on 2 different databases. The "2 databases" requirement is important because we are planning to integrate the hibernate 3.0 layer on legacy systems.
Lets say you have a Sybase database on one side having 50 tables and on the other side a Oracle database with 50 tables. There's some "logical" relations between theses 2 databases: some foreign keys on some Sybase tables is "loosely linked" to the primary key on some of the Oracle tables. So theorically you could build a "many-to-one" relationship from one database to the other.
I guess that the best way to do it would be to "configure" in the xml mapping file the actual database implementation of all Hibernate VOs.
In other words, I would like to know if I could linked theses two databases (2 hibernate.cfg.xml probably?) by only one "mapping strategy", only one set of "mappings.hbm.xmls". That way I could isolate the persistence strategy (domain model or Hibernate VO) from the multi-databases.
Thanks For answering!
Etienne
Montreal
|
|