}
static function sqlColumnDefn(&$query, &$sqlColumns, $field) {
- if (substr($field, -4) == '_a_b' ||
- substr($field, -4) == '_b_a'
- ) {
+ if (substr($field, -4) == '_a_b' || substr($field, -4) == '_b_a') {
return;
}
$fieldName = 'civicrm_primary_id';
}
+ // early exit for master_id, CRM-12100
+ // in the DB it is an ID, but in the export, we retrive the display_name of the master record
+ if ($fieldName == 'master_id') {
+ $sqlColumns[$fieldName] = "$fieldName varchar(128)";
+ return;
+ }
+
// set the sql columns
if (isset($query->_fields[$field]['type'])) {
switch ($query->_fields[$field]['type']) {