cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Returning updated rows from SQLTemplate
Date Mon, 15 Sep 2008 09:45:32 GMT
Is this a dupe? This already got answered here:

http://markmail.org/message/v7ioxwdwh3ffrwuq

and here:

http://markmail.org/message/iik2xe7mk47baium

Andrus


On Sep 15, 2008, at 12:22 PM, Laurent Marchal wrote:

> 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.
>
>
>
>


Mime
View raw message