Custom SQL query - HowTo

From: Ayhan Kondoz (Ayhan.Kondo..reenet-ag.de)
Date: Thu Aug 03 2006 - 04:42:34 EDT

  • Next message: Nikolai Raitsev: "objectFromDataRow(String, DataRow) exist not in cayenne-1.2"

    Hello,

    i need to make a custom SQL query where the resultSet doesn't match any
    of the dataMap's. My SQL query only returns a list of id's. Something
    like this

    SELECT customer.id FROM customer c WHERE .....

    And I want to iterate through this list of id's and do something with
    them.

    Could someone please tell me how to do this with cayenne? I tried to use
    SQLTemplate but it needs a DataMap or something similar to work but I
    don't have an appropriate DataMap!!!
    Then I tried to use a dataContext.performGenericQuery() but again I
    don't know how to create a proper Query object.

    Thx
    Ayhan Kondoz



    This archive was generated by hypermail 2.0.0 : Thu Aug 03 2006 - 04:43:04 EDT