dynamic values <condition attribute RRS feed

  • Question

  • Hi,
    I have a problem in writing an XML Querey to comapre two fields in same entity. For example :



    fetch mapping='logical'>
    entity name='XXX'>
    attribute name='test_id'/>
    <filter type='and'>
    condition attribute="date_to" operator='gt' value="datefrom"/>

    Now my requirement is I want another attribute in the value section instead of using any hardcore or predefined value. The logic is select the values where Date_To is Greater that Date_From. Both Date_To and Date_From attributes belong to the same entity. How can I write the condition? It is like “ t1.date_to > t1.date_from” in sql query.

    Monday, April 6, 2009 10:15 AM


  • Hi,
    1. if you can, use sql query using filteredXXX
    2. if not you will need to retrieve all data from your entity and filter locally
    Monday, April 6, 2009 10:46 AM