assume we need to write a HQL or JPQL query that reads from two db servers:
Is it possible to write such a query using SMPC and JPA/Hibernate as persistence provider? I have a feeling not, because each EntityManager instance is based on a single datasource, which in turn is based on a single db in a single server.
So how do you guys handle these situations? Resort to native queries with JPQL createNativeQuery method or stored procs?