Good day all,
I have a native query generated for my entitymanager to execute like this
SELECT substr(q.POLICY_NUMBER, 8, 5) AS
quote_payment_id,
q.policy_number,
SUM(q.amount) AS
amount,
q.processed
FROM quote_payment q
WHERE q.processed = 'N'
GROUP BY q.policy_number,
q.processed
the resultSet returns 2 identical row instead of 2 summary rows.
When I refactored the same application using JDBC in the same method, everything worked fine.
So, the question is what other parameters could make createNativeQuery not work fine? I have tried adding
<property name="toplink.jdbc.native-sql" value="true"/>
to the persistence.xml file but nothing has worked so far.
please, need little enlightenment on this. I am using Toplinks against an Oracle Database
Regards,
Michael