- 
  Notifications
 You must be signed in to change notification settings 
- Fork 191
Closed
Labels
Milestone
@iulianb 
Description
I'm implementing a custom db expression and I've noticed the issue mentioned in the title. I've worked out the source of the issue in the OracleQuerySqlGenerator class of the Oracle.EntityFrameworkCore.Query.Sql.Internal namespace, the function that handles the translation of the TO_CHAR function inverts the indexes of the arguments. Not sure if it's intentional, although I can't understand why it would be.
new SqlFunctionExpression( // if this is uppercased then its arguments are inverted in the generated sql, it works fine when // lowercased because the translation code tests for equality on the uppercased version "to_char", new SqlExpression[] { // ... }, nullable: false, argumentsPropagateNullability: new[] { false, false }, type: args[0].Type, typeMapping: args[0].TypeMapping)