group CustomFieldHistorySqlDao;

fields(prefix) ::= <<
  <prefix>history_record_id,
  <prefix>id,
  <prefix>object_id,
  <prefix>object_type,
  <prefix>field_name,
  <prefix>field_value,
  <prefix>updated_by,
  <prefix>date,
  <prefix>change_type
>>

batchAddHistoryFromTransaction() ::= <<
    INSERT INTO custom_field_history(<fields()>)
    VALUES(:historyRecordId, :id, :objectId, :objectType, :fieldName, :fieldValue, :userName, :updatedDate, :changeType);
>>