JPQL to SQL Translation Bug? [message #1637954] |
Thu, 26 February 2015 19:13  |
Eclipse User |
|
|
|
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 #1639822 is a reply to message #1639203] |
Fri, 27 February 2015 15:55  |
Eclipse User |
|
|
|
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'.
|
|
|
Powered by
FUDForum. Page generated in 0.07486 seconds