I have only one getCustomerUsingID().
Using the above method, dynamically I need to fetch data from different table.
Example :
In JPA, getCustomerUsingID()
fetch data from OrangeCustomerTable and also from AppleCustomerTable using the id which i send in parameter. is it possible?
Note:
- No DAO Class should be used.
- Entity class has mapping with tables.
It's possible. You can write custom (maybe HQL) queries, write custom Spring Data JPA repositories / Projections, write Spring Data JPA Specifications or define mappings like this.