Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Possible concatenation bug in InformixPlatform?

Hi Laird,

  It looks like our InformixPlatform is currently setup to use "+" for concatenation.  It should be quite easy to work around.   You can subclass InformixPlatform and add a method like this to it:

  @Override
    protected void initializePlatformOperators() {
        super.initializePlatformOperators();
        addOperator(ExpressionOperator.simpleLogicalNoParens(ExpressionOperator.Concat, "||"));
  }

  Then you can use the eclipselink.target-database persistence unit property to point to your new platform class.

-tom

On 22/08/2013 10:28 AM, Laird Nelson wrote:
I'm getting the following error when running a JPQL query that involves CONCAT and UPPER on an Informix 11.7 database:

Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Routine (upper) ambiguous - more than one routine resolves to given signature.
Error Code: -9700
Call: SELECT t0.id FROM informix.id_rec t0, informix.aa_table t2, informix.aa_rec t1 WHERE ((((NOT EXISTS (SELECT 1 FROM informix.profile_rec t3 WHERE (t3.id = t0.id))  AND ((t0.valid IS NULL) OR (t0.valid <> 'N'))) AND (t2.email = 'Y')) AND UPPER(((RTRIM(LTRIM(t1.line1)) + RTRIM(LTRIM(t1.line2))) + RTRIM(LTRIM(t1.line3)))) LIKE ?) AND ((t0.id = t1.id) AND (t2.aa = t1.aa))) ORDER BY t0.id ASC
bind => [1 parameter bound]

Note the "+" being used.  Is that a JDBC escape syntax, or is the InformixPlatform not correctly using the Informix-specific "||" concatenation operator?

Any idea why UPPER can't be resolved on Informix?

Best,
Laird

--
http://about.me/lairdnelson


_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top