Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » JPQL Question - empty string
JPQL Question - empty string [message #1066318] Tue, 02 July 2013 07:28 Go to next message
Reiner Lott is currently offline Reiner LottFriend
Messages: 7
Registered: April 2013
Junior Member
Hi,

in my SQL Client i used the following statement:

select * from mytable where value = ''

--> returns resultset

====================================

the JPQL pendant would be:

select m from entityname m where m.value = ''

--> returns nothing

====================================

but this works:

select m from entityname m where m.value = ' '


is this a bug?

Cheers
Reiner

Re: JPQL Question - empty string [message #1066640 is a reply to message #1066318] Wed, 03 July 2013 14:20 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

My guess is your JDBC driver is doing some odd translation of the SQL. You can enable logging to see the SQL that EclipseLink generates.
EclipseLink does not do anything special with '' or ' '.

Also try using a parameter instead of inlining the string.


James : Wiki : Book : Blog : Twitter
Previous Topic:Nulling an embedded object does not affect the database upon merge
Next Topic:Eclipse link DBWS -Connection is null
Goto Forum:
  


Current Time: Thu Apr 25 18:11:14 GMT 2024

Powered by FUDForum. Page generated in 0.04032 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top