[ 
https://issues.apache.org/jira/browse/OPENJPA-1726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Fay Wang updated OPENJPA-1726:
------------------------------

    Attachment: OPENJPA-1726-2.patch

TestTypeSafeCondExpression.testTrimFunc1 and testTrimFunc2 fail in Postgres 
when the criteria API is used:

Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ERROR: function 
pg_catalog.btrim(character varying, integer) does not exist
Hint: No function matches the given name and argument types. You might need to 
add explicit type casts.
Position: 8 {prepstmnt 598291031 SELECT TRIM(BOTH ? FROM t0.compName) FROM 
CompUser t0 WHERE (t0.name = ?) [params=?, ?]} [code=0, state=42883]

In these test cases, OpenJPA criteria API sets the trim character as the 
Character type, resulting in the call of PreparedStatement.setInt for the trim 
character (via DBDictionary.setChar). Postgres therefore throws error that 
function pg_catalog.btrim(character varying, integer) does not exist. The patch 
OPENJPA-1726-2.patch modifies the trim character  to String type to fix this 
problem.


> Clean up OpenJPA test case failures for PostgreSQL
> --------------------------------------------------
>
>                 Key: OPENJPA-1726
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1726
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 2.1.0
>            Reporter: Fay Wang
>            Assignee: Fay Wang
>            Priority: Minor
>         Attachments: OPENJPA-1726-2.patch, OPENJPA-1726.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to