// The assumption here is that the SQL UPDATE statement generated will not need to use multiple
// tables. This means that the SET clause only refers to the table of the candidate, and that
// the WHERE clause only refers to the table of the candidate.
// It is possible with some RDBMS e.g MySQL that support multiple table update syntax
// that these 2 conditions don't need to be enforced.
DatastoreAdapter dba = ((RDBMSStoreManager)ec.getStoreManager()).getDatastoreAdapter();
if (stmt.getNumberOfTables() > 0 && !dba.supportsOption(RDBMSAdapter.UPDATE_MULTITABLE))
{
throw new NucleusDataStoreException("Bulk update requires use of multiple tables yet datastore doesnt allow multiple table syntax");
}
datastoreCompilation.setSQL(stmt.getUpdateStatement().toString());
datastoreCompilation.setStatementParameters(stmt.getSelectStatement().getParametersForStatement());