This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cross database query using hibernate

 
Rahul Solanki
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Currently we have 2 databases on our system where we are using linked servers (SQL SERVER) to fetch the data from both the servers (Cross database query).

In future we would like to move our Database from SQL Server to MySQL and thus we does not won't to use native sql or stored procedures as it will add extra efforts for the database migration project.

Now I am trying to implement hibernate using POJOs but my cfg files are pointing to 2 different servers. How can I achieve connectivity between 2 different databases or querying between 2 different database tables.



Please suggest the best way to implement this using Hibernate.

Please suggest how to achieve or suggest a better way of doing it.

Thanks,
Rahul
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic