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)

Shouldn't that for sure be eascaped at the EclipseLink level? I've
never used a library that supported parameters/binding that didn't
escape everything, I thought that was half the point of parameters...

./tch



On Mon, Sep 22, 2008 at 8:54 AM, Michael O'Brien
<michael.obrien@xxxxxxxxxx> wrote:
> 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
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>


Back to the top