* the primary keys
* @return the sql query from jpa
*/
public String getSqlQueryFromJPA(EntityMetadata entityMetadata, List<String> relations, Set<String> primaryKeys)
{
ApplicationMetadata appMetadata = kunderaMetadata.getApplicationMetadata();
Metamodel metaModel = appMetadata.getMetamodel(entityMetadata.getPersistenceUnit());
if (jpaQuery != null)
{
String query = appMetadata.getQuery(jpaQuery);
boolean isNative = kunderaQuery != null ? kunderaQuery.isNative() : false;
if (isNative)
{
return query != null ? query : jpaQuery;