0

Can we use one entity manager for multiple databases in hibernate?

If yes please how can I do this with Spring MVC?

Thanks in advance

bcperth
  • 2,191
  • 1
  • 10
  • 16
Ahmad
  • 1
  • You can't use one entity manager. see post: https://stackoverflow.com/questions/33257543/how-do-i-use-multiple-databases-with-jpa – Shiva Nov 15 '18 at 11:32
  • 1
    what do you mean by "multiple databases" ? multiple schema in the same database server? I don't see what Spring MVC has got to do with that at all ... this is JPA and nothing else –  Nov 15 '18 at 12:10
  • yes in the same database server, with Spring i can use @primary – Ahmad Nov 15 '18 at 12:21

0 Answers0