@logExceptions(_LOGGER)<EOL><INDENT>@g_retrySQL<EOL>def modelSetFields(self, modelID, fields, ignoreUnchanged = False):<DEDENT>
<EOL>assignmentExpressions = '<STR_LIT:U+002C>'.join(<EOL>'<STR_LIT>' % (self._models.pubToDBNameDict[f],) for f in fields.keys())<EOL>assignmentValues = list(fields.values())<EOL>query = '<STR_LIT>''<STR_LIT>'% (self.modelsTableName, assignmentExpressions)<EOL>sqlParams = assignmentValues + [modelID]<EOL>with ConnectionFactory.get() as conn:<EOL><INDENT>numAffectedRows = conn.cursor.execute(query, sqlParams)<EOL>self._logger.debug("<STR_LIT>",<EOL>numAffectedRows, query, sqlParams)<EOL><DEDENT>if numAffectedRows != <NUM_LIT:1> and not ignoreUnchanged:<EOL><INDENT>raise RuntimeError(<EOL>("<STR_LIT>"<EOL>"<STR_LIT>") % (<EOL>fields, modelID, self._connectionID, numAffectedRows, query,<EOL>sqlParams,))<EOL><DEDENT>
Change the values of 1 or more fields in a model. Here, 'fields' is a
        dict with the name/value pairs to change. The names are the public names of
        the fields (camelBack, not the lower_case_only form as stored in the DB).

        Parameters:
        ----------------------------------------------------------------
        jobID:     jobID of the job record

        fields:    dictionary of fields to change

        ignoreUnchanged: The default behavior is to throw a
        RuntimeError if no rows are affected. This could either be
        because:
          1) Because there was no matching modelID
          2) or if the data to update matched the data in the DB exactly.

        Set this parameter to True if you expect case 2 and wish to
        supress the error.