Returning updated rows from SQLTemplate

From: Laurent Marchal (biguphp..mail.com)
Date: Mon Sep 15 2008 - 10:11:14 EDT

  • Next message: Laurent Marchal: "3.0M4 : Fetching from relationship returns TRANSIENT objects."

    Hello !

    I use Cayenne 3.0M4 and since UpdateQuery is deprecated i use a
    SQLTemplate query to do an UPDATE.
    The thing is i would like to know how many rows are updated, and the
    query returns no DataRows.

    SQLTemplate query = new SQLTemplate(..., "UPDATE...");
    query.setFetchingDataRows(true);

    List<DataRow> dtList = context.performQuery(query);

    the returned list is always empty....
    How can i get the precious Integer saying "X rows updated" ?

    Thanks.
    Laurent Marchal.



    This archive was generated by hypermail 2.0.0 : Mon Sep 15 2008 - 10:20:51 EDT