How to Getting the SQL String Representations for a Criteria Query with parmetervalue ?
I tried this but it returns a string to me without the parameter values:
String QueryString = 'SELECT * FROM CUSTOMERS WHERE lastname = ?'
query = entityManager.createNativeQuery(QueryString);
query.setParameter(1, "toto");
System.out.print(query.unwrap(JpaQuery.class).getDatabaseQuery().getSQLString());
But returns "SELECT * FROM CUSTOMERS WHERE lastname = ?" instead of "SELECT * FROM CUSTOMERS WHERE lastname = 'toto'"