Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Okay to have non-word characters in ds identifier?

    For one of our static datasources, we need to use non-word characters (which are brackets) in a ds identifier. Something like this:

    <field name="reverse(foo)" ...

    And in our MySQL query we use the back-ticks around the identifier

    select reverse(foo) as `reverse(foo)`

    To our surprise, this seems to work. So far we do not see any ill effect except a log warning message saying "reverse(foo) is not a valid ds identifier".

    Just want to confirm this construct is okay and there are no other ill effects down the road. Thanks!

    #2
    Hi leeyuiwah,

    this is not allowed, as the warning says. See this dsField.name docs.
    Why don't you do:
    Code:
    <field name="reversefoo" customSelectExpression="reverse(foo)"...
    Best regards
    Blama

    Comment


      #3
      Just to make it official - Blama's response is exactly what Support would have said (thanks Blama!).

      Comment


        #4
        Thanks! We tried the solution by Blama and it works!

        Comment

        Working...
        X