(ObjectContext context)
| 177 | } |
| 178 | |
| 179 | public int update(ObjectContext context) { |
| 180 | |
| 181 | // TODO: create a corresponding method in ObjectContext |
| 182 | QueryResult results = execute(context); |
| 183 | |
| 184 | if (results.size() != 1) { |
| 185 | throw new CayenneRuntimeException("Expected a single update result. Got a total of %d", results.size()); |
| 186 | } |
| 187 | |
| 188 | return results.firstUpdateCount(); |
| 189 | } |
| 190 | |
| 191 | public int[] updateBatch(ObjectContext context) { |
| 192 | // TODO: create a corresponding method in ObjectContext |