Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [eclipselink-dev] isDynamicSQLRequiredForFunctions used in select list

The coalesce function is a special dynamically built function.  It is built in Expression.coalesce(), not in the platform (that one seems to be ignored entirely).
This is the same as is done for the case function I think.

This is unfortunate, as it does not allow the platform to give its own syntax for the function, or customize it in any way.  I think the code should be changed to somehow allow the platform to customize these functions, perhaps during the printing of the SQL.
Please log a bug for this.  You could either look into fixing the bug, or for now, just set operator.setIsBindingSupported(false) in the Expression.coalesce().

-----Original Message-----
From: Dies Koper [mailto:diesk@xxxxxxxxxxxxxxxxxxx]
Sent: Tuesday, January 12, 2010 1:36 AM
To: Dev mailing list for Eclipse Persistence Services
Subject: [eclipselink-dev] isDynamicSQLRequiredForFunctions used in select list

Hi James,

I noticed your addition of isDynamicSQLRequiredForFunctions to some of
the database platforms.
As Symfoware also has a number of functions which do not allow
parameters, I've been looking at using this so I don't need to disable
primitive binding completely.

Is my understanding correctly that when I use that, I need to call
operator.setIsBindingSupported(false); on each of the operators that do
not allow parameters as arguments?

That's what I did, and all but the following test pass:

This particular test has COALESCE in the select list, and Symfoware
complains about the input parameter used as argument:

WHERE ((t0.F_NAME = ?) AND (t1.EMP_ID = t0.EMP_ID)) bind => [Bobby, Bob]

I call setIsBindingSupported on ExpressionOperator.coalesce() before I
add the Symfoware platform operator, but the third parameter became an
input parameter.
Is this as expected?


eclipselink-dev mailing list

Back to the top