0

I have a sql query like this

Select * from DB1.Table1 a left join DB2.Table2 b on a.dCode = b.dCode where bID = 123;

How can I create jpa code for the above query? what would be the params of JpaRepository

public interface TestRepository extends JpaRepository<???, ???> {

    @Query("???")
    ??? myTestQueryCOde(Integer bID);
}

What would be at ???

DataNucleus
  • 15,497
  • 3
  • 32
  • 37
coure2011
  • 40,286
  • 83
  • 216
  • 349

1 Answers1

2

I am not sure if Spring JPA Data support cross DB queries, but have a look at Cross database joins in JPA

Community
  • 1
  • 1
Scary Wombat
  • 44,617
  • 6
  • 35
  • 64