[
https://issues.apache.org/jira/browse/OPENJPA-2426?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Richard Zowalla resolved OPENJPA-2426.
--------------------------------------
Resolution: Won't Fix
Closing as obsolete during backlog cleanup: This is a support question about
PostgreSQL 9.1 in Aries JPA. The posted query is a plain equality with no LIKE,
the reporter doubts their own environment, and no defect or error is
identified. Please reopen if this still happens with OpenJPA 4.x.
> LIKE operator fails with Postgresql v 9.1
> -----------------------------------------
>
> Key: OPENJPA-2426
> URL: https://issues.apache.org/jira/browse/OPENJPA-2426
> Project: OpenJPA
> Issue Type: Question
> Components: jpa
> Affects Versions: 2.2.2
> Environment: Apache Karaf v 2.3.2 and Aries JPA
> Reporter: Glenn Silverman
> Priority: Major
> Labels: Aries, JPA
>
> I'm getting very discouraged with OpenJPA as it relates to Postgresql v 9.1
> and and creating queries using the LIKE operator. I know there was an issue
> a few years back, https://issues.apache.org/jira/browse/OPENJPA-2056, but
> I've tried everything mentioned there as a workaround to get a simple query
> like this to work:
> Query query = em.createQuery("SELECT p FROM Patient p where p.lastname =
> :lastname");
> query.setParameter("lastname", "Silver");
>
> List<Patient> patients = query.getResultList();
> I've tried different property settings in my persistence.xml:
> <property name="openjpa.jdbc.DBDictionary" value="postgres"/>
> and this:
> <property name="openjpa.jdbc.DBDictionary"
> value="postgres(SearchStringEscape=\)"/>
> and even this:
> <property name="openjpa.jdbc.DBDictionary"
> value="postgresRequiresSearchStringEscapeForLike=false)"/>
> Nothing works. I'm not even convinced Aries JPA, the environment I'm running
> in under Karaf, even recognizes these property settings.
> When I use Hibernate as my persistence provider, I don't have this problem.
> I don't want to give up on OpenJPA in my OSGi environment, but I may have to
> if no one has a solution.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)