#1581 - ENH: Add query.asUpdate() ... to convert a query into an UpdateQuery (typically with query beans)

This commit is contained in:
rob bygrave committed 2018-12-19 14:45:33 +13:00
1 parent 8fc6c4c648
commit 138b587ff7
7 files changed
+106 -2

No files matched your search

@@ -22,6 +22,7 @@ import io.ebean.QueryIterator;
import io.ebean.QueryType;
import io.ebean.RawSql;
import io.ebean.Transaction;
import io.ebean.UpdateQuery;
import io.ebean.Version;
import io.ebean.bean.CallStack;
import io.ebean.bean.ObjectGraphNode;
@@ -296,6 +297,11 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
return server.findDto(dtoClass, this);
}
@Override
public UpdateQuery<T> asUpdate() {
return new DefaultUpdateQuery<>(this);
}
@Override
public BeanDescriptor<T> getBeanDescriptor() {
return beanDescriptor;