Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] JPQL produces SQL syntax error on Informix, but only because of PreparedStatement binding?

On Mon, Feb 25, 2013 at 2:14 PM, Laird Nelson <ljnelson@xxxxxxxxx> wrote:
On Mon, Feb 25, 2013 at 7:57 AM, Tom Ware <tom.ware@xxxxxxxxxx> wrote:
  Does calling databasePlatform.setShouldBindLiterals(false) in a SessionCustomizer solve the issue?

Yes, but introduces another.  This too is due to Informix's bizarre syntax.

Specifically, it works fine for numbers (yay) and gets us past the Informix CASE syntax issue above.

But when binding boolean parameters by turning them into literals, EclipseLink seems to try to use numbers.

I opened bug 401746 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=401746) to track this.

In the meantime, now that I can override the stock InformixPlatform with ease, I found the DatabasePlatform#appendBoolean(Boolean, Writer) method that appears to be called when binding literals as parameters is off.  I overrode this in our InformixPlatform bugfix class to append either "t" or "f" to the supplied Writer.  I would think the same change should be made to the core Informix platform class.

Best,
Laird
--
http://about.me/lairdnelson

Back to the top