Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [eclipselink-users] Issue with namedQuery/setParameter and string which contains "'" (single quote)

Jan,
   It may be an unescaped single quote (') in the partial argument jan's.  I get this sometimes across the web with my last name as well.  I'll check if this should be escaped at the eclipselink or application level.

   Thank you
   /michael

----------Original Message----------

From: Jan Vissers <Jan.Vissers@xxxxxxxxxx>
Sent: Mon, September 22, 2008 8:49 AM
To: EclipseLink User Discussions <eclipselink-users@xxxxxxxxxxx>
Subject: [eclipselink-users] Issue with namedQuery/setParameter and string which contains "'" (single quote)


I get the following error:

Caused by: Exception [EclipseLink-8024] (Eclipse Persistence Services - 1.0.1 (Build 20080905)): org.eclipse.persistence.exceptions.JPQLException
Exception Description: Syntax error parsing the query [select count(e) from Selection e  where e.owner = 'tangelo_admin' and e.name = 'Jan's selectie' and e.deleted = false], line 1, column 84: syntax error at [s].
Internal Exception: MismatchedTokenException(66!=-1

This must be a simple one right, what am I missing. I'm trying to query records for which e.name = "Jan's selectie"

Thanks,
-J.



_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top