Announcement

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

    How to Apply $criteria attribute in FROM clause

    Code:
    <customSQL>
    UPDATE schedules
    SET name = entity.name
    FROM $criteria.tableName AS entity
    WHERE entity.entityId = entityId 
    </customSQL>
    Hi, I'm trying to make a generate custom sql in my datasource descripter file. However, when an error is raised because the FROM clause does not expect a criteria velocity statment.

    My question is: How can I include a variable with the FROM clause so I don't have to write multiple operations id for different tables.



    "v8.2p_2014-04-18/TriaEdition Deployment\"

    FireFox 37+

    #2
    Your version is way too old to be used for new development - it pre-dates several browsers that are now popular. You should update to a new version.

    Normal behavior is that $criteria.tableName would be *replaced* by some dynamic value before your database sees it. The problem here is most likely that there is no "tableName" value in the criteria - you forgot to post the server log for the request, which would have allowed us to say definitively.

    See also dsRequest.addToTemplateContext() if you are trying to dynamically provide a tableName.

    Comment

    Working...
    X