How to have named native queries for 2 databases and have the EclipseLink run the right one on the db?
I give an example: I have a solution that can run with Oracle Db and PostgreSQL. There is a need for native queries to be run on db. So the native query for the Oracle is different to the one for PostgresSQL. How can I have them in the orm.xml as named queries and then have EclipseLink run the correct one on each db based on the run time environment.
Should there be alternative orm files for each database? No stored procedure/db function and similar stuff is allowed. So I have to have named native quires.