Skip to main content



      Home
Home » Eclipse Projects » EclipseLink » JPQL to SQL Translation Bug?(Found what appears to be bug in JPQL to SQL Translation)
JPQL to SQL Translation Bug? [message #1637954] Thu, 26 February 2015 19:13 Go to next message
Eclipse UserFriend
Hi All, I'm working a bug where our code assembles a JPQL query like "SELECT t FROM SomeEntity t WHERE ( ( t.id='1' ) AND (t.id='2') ) and it somehow returns a row.

I turned on FINEST debugging to see the SQL statement being generated by EclipseLink which is "SELECT ID, BLAH, BLAH, BLAH FROM SOME_TABLE WHERE (ID = ?) bind => [2]"

It appears as if the t.id='1' is getting overwritten/replaced by the t.id='2' as if some sort of hashmap were being used to store parameters. Any other ideas? Could our extra parentheses be causing a problem? We put those in to fix some other problems, so I hope not.

We're using EclipseLink 2.5.0.v20130507-3faac2b, the version that comes with Glassfish 4.0 Build 89.

The reason why we are doing this sort of query is for testing bad inputs from clients which we do not control.

If you think I should post a bug, please let me know; I'd be happy to do so. I just don't want to post a bug before verifying.

Thanks for looking!
Re: JPQL to SQL Translation Bug? [message #1639203 is a reply to message #1637954] Fri, 27 February 2015 09:14 Go to previous messageGo to next message
Eclipse UserFriend
I tested quickly against master(2.6.0) in my local dev environment and I'm not able to recreate what you're seeing. Either it was fixed in trunk, or I'm missing something in my test.

Can you try to create a small standalone test to verify if this problem also exists on trunk? If it does, this sounds like a bug to me.
Re: JPQL to SQL Translation Bug? [message #1639822 is a reply to message #1639203] Fri, 27 February 2015 15:55 Go to previous message
Eclipse UserFriend
Hi Rick, thanks for the quick response. I did notice we are using 2.5.0 and that 2.5.2 seems to be the latest version to download. Do you or anyone else out there know if any newer versions are delivered in later versions of Glassfish? If so, I could try upgrading and give it a try. I'm not really setup to make a small test case or run it - that, and I have a small explosion to put out today - too big to call it a 'fire'.
Previous Topic:Doing all my transactions in one transaction
Next Topic: Eclipse Luna SR2 (4.4.2) Release for Windows
Goto Forum:
  


Current Time: Tue Jul 15 22:21:39 EDT 2025

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

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

Back to the top