Skip to main content



      Home
Home » Eclipse Projects » EclipseLink » JPQL Question - empty string
JPQL Question - empty string [message #1066318] Tue, 02 July 2013 03:28 Go to next message
Eclipse UserFriend
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 10:20 Go to previous message
Eclipse UserFriend
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.
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 Jul 24 10:11:16 EDT 2025

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

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

Back to the top