Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-11106

camel-sql - allow using the $simple{} syntax for query arguments

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.18.3
    • Fix Version/s: 2.18.4
    • Component/s: camel-sql
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      The $simple{} syntax is useful to avoid clash with spring property placeholders. The camel-sql component does not recognize it, so when users create endpoints like:

      <to id="_to1" uri="sql:select * from accounts where customerid = :#${header.xxx}?dataSource=dataSource"/>
      

      I.e. use the id field and the "${header.xxx}" syntax, spring tries to find a property named "header.xxx" and crashes.

      We should allow writing:

      <to id="_to1" uri="sql:select * from accounts where customerid = :#$simple{header.xxx}?dataSource=dataSource"/>
      

        Attachments

          Activity

            People

            • Assignee:
              nferraro Nicola Ferraro
              Reporter:
              nferraro Nicola Ferraro
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: