Re: Fetching Specified "Raw Rows" with SelectQuery

From: Andrew Lindesay (ap..indesay.co.nz)
Date: Sun Apr 25 2010 - 05:07:53 EDT

  • Next message: Andrus Adamchik: "Re: Fetching Specified "Raw Rows" with SelectQuery"

    Hi Andrus;

    Thanks for the speedy response.

    I saw this facility in the 2.0 API.

    I would rather not have free-form query strings in my code; I prefer compiling against the Cayenne query-assembly objects.

    Do you think this would be a tricky thing for me to safely implement in the 3.0-TRUNK?

    cheers.

    > We had this functionality prior to Cayenne 3.0. Now the recommended way to specify columns is to use EJBQLQuery instead of SelectQuery. It would return either a list of scalars or list of Object[], depending on a number of columns in the query. E.g.:
    > "select a.artistName from Artist a"
    ...
    >> The "SelectQuery" has the method "setFetchingDataRows()" which I understand to mean that the query will return a List<org.apache.cayenne.DataRow>.
    >> I would also like to specify the attribute properties or similar which I would like to be returned for the query –– is this possible with Cayenne?

    ___
    Andrew Lindesay
    www.silvereye.co.nz



    This archive was generated by hypermail 2.0.0 : Sun Apr 25 2010 - 05:09:05 EDT