use of org.eclipse.persistence.queries.UpdateAllQuery in project eclipselink by eclipse-ee4j.
the class UpdateAllQueryAdvancedJunitTest method testAssignObjectToAddress.
public static void testAssignObjectToAddress() {
Address address = new Address();
address.setCountry("Canada");
address.setProvince("Ontario");
address.setCity("Ottawa");
address.setStreet("O'Connor");
UnitOfWork uow = acquireUnitOfWork();
uow.registerNewObject(address);
uow.commit();
UpdateAllQuery updateQuery = new UpdateAllQuery(Employee.class);
updateQuery.addUpdate("address", address);
updateAllQueryInternal(updateQuery);
}
use of org.eclipse.persistence.queries.UpdateAllQuery in project eclipselink by eclipse-ee4j.
the class UpdateNode method createDatabaseQuery.
/**
* INTERNAL
* Returns a DatabaseQuery instance representing the owning
* ParseTree. This implementation returns a UpdateAllQuery instance.
*/
@Override
public DatabaseQuery createDatabaseQuery(ParseTreeContext context) {
UpdateAllQuery query = new UpdateAllQuery();
query.setShouldDeferExecutionInUOW(false);
return query;
}
Aggregations