javajpaswitchyard

Use switchyard property in jpa binding native query


Lets say I have a property defined in my switchyard.xml

Switchyard Property Definition

If I have a JPA native query, also in my switchyard.xml that includes

(select sysdate + interval '720' minute from dual)

I would like to use the property in the native query such as

 (select sysdate + interval '{horizonWindowMinutes}' minute from dual)

Is there a way using switchyard that I can achieve this property substitution?


Solution

  • Nearly had it. Just needed to add the $ sign at the start of the property substitution.

     (select sysdate + interval '${horizonWindowMinutes}' minute from dual)