diff --git a/relation_migrate/relation_migrate.destination.inc b/relation_migrate/relation_migrate.destination.inc
new file mode 100644
index 0000000..a73a7e7
--- /dev/null
+++ b/relation_migrate/relation_migrate.destination.inc
@@ -0,0 +1,202 @@
+<?php
+
+/**
+ * @file
+ * Support for relation destinations.
+ */
+
+/**
+ * Destination class implementing migration into relation.
+ */
+class MigrateDestinationRelation extends MigrateDestinationEntity {
+  static public function getKeySchema() {
+    return array(
+      'rid' => array(
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'description' => 'Unique relation id (entity id).',
+      ),
+    );
+  }
+
+  /**
+   * Basic initialization
+   *
+   * @param string $bundle
+   *  A.k.a. the content type (page, article, etc.) of the node.
+   * @param array $options
++   *  Options applied to nodes.
+   */
+  public function __construct($bundle, array $options = array()) {
+    parent::__construct('relation', $bundle, $options);
+  }
+
+  /**
+   * Returns a list of fields available to be mapped for the relation type (bundle)
+   *
+   * @return array
+   *  Keys: machine names of the fields (to be passed to addFieldMapping)
+   *  Values: Human-friendly descriptions of the fields.
+   */
+  public function fields() {
+    $fields = array();
+    // First the core (relation table) properties
+    $fields['rid'] = t('Relation: Existing relation ID');
+    $fields['is_new'] = t('Relation: Indicates a new relation with the specified rid should be created');
+    $fields['uid'] = t('Relation: Authored by (uid)');
+    $fields['created'] = t('Relation: Created timestamp');
+    $fields['changed'] = t('Relation: Modified timestamp');
+
+    // Then add in anything provided by handlers
+    $fields += migrate_handler_invoke_all('Entity', 'fields', $this->entityType, $this->bundle);
+    $fields += migrate_handler_invoke_all('Relation', 'fields', $this->entityType, $this->bundle);
+
+    return $fields;
+  }
+
+  /**
+   * Delete a batch of relations at once.
+   *
+   * @param $rids
+   *  Array of relation IDs to be deleted.
+   */
+  public function bulkRollback(array $rids) {
+    migrate_instrument_start('relation_delete_multiple');
+    $this->prepareRollback($rids);
+    relation_delete_multiple($rids);
+    $this->completeRollback($rids);
+    migrate_instrument_stop('relation_delete_multiple');
+  }
+
+  /**
+   * Import a single relation.
+   *
+   * @param $relation
+   *  Relation object to build. Prefilled with any fields mapped in the Migration.
+   * @param $row
+   *  Raw source data object - passed through to prepare/complete handlers.
+   * @return array
+   *  Array of key fields (rid only in this case) of the relation that was saved if
+   *  successful. FALSE on failure.
+   */
+  public function import(stdClass $relation, stdClass $row) {
+    // Updating previously-migrated content?
+    $migration = Migration::currentMigration();
+    if (isset($row->migrate_map_destid1)) {
+      // Make sure is_new is off
+      $relation->is_new = FALSE;
+      if (isset($relation->rid)) {
+        if ($relation->rid != $row->migrate_map_destid1) {
+          throw new MigrateException(t("Incoming rid !rid and map destination rid !destid1 don't match",
+            array('!rid' => $relation->rid, '!destid1' => $row->migrate_map_destid1)));
+        }
+      }
+      else {
+        $relation->rid = $row->migrate_map_destid1;
+      }
+      // Get the existing vid, so updates don't generate notices
+      $values = db_select('relation', 'r')
+                   ->fields('r', array('vid'))
+                   ->condition('rid', $relation->rid)
+                   ->execute()
+                   ->fetchAssoc();
+      $relation->vid = $values['vid'];
+    }
+    if ($migration->getSystemOfRecord() == Migration::DESTINATION) {
+      if (!isset($relation->rid)) {
+        throw new MigrateException(t('System-of-record is DESTINATION, but no destination rid provided'));
+      }
+      $old_relation = relation_load($relation->rid);
+      if (!isset($relation->created)) {
+        $relation->created = $old_relation->created;
+      }
+      if (!isset($relation->vid)) {
+        $relation->vid = $old_relation->vid;
+      }
+      if (!isset($relation->uid)) {
+        $relation->uid = $old_relation->uid;
+      }
+    }
+
+    // Set some required properties.
+    // Set type before invoking prepare handlers - they may take type-dependent actions.
+    $relation->relation_type = $this->bundle;
+
+    if ($migration->getSystemOfRecord() == Migration::SOURCE) {
+
+      // relation_save() will blow these away, so save them here and
+      // save them later.
+      if (isset($relation->created)) {
+        $created = MigrationBase::timestamp($relation->created);
+      }
+      if (isset($relation->changed)) {
+        $changed = MigrationBase::timestamp($relation->changed);
+      }
+    }
+
+    // Trying to update an existing relation
+    if ($migration->getSystemOfRecord() == Migration::DESTINATION) {
+      // Incoming data overrides existing data, so only copy non-existent fields
+      foreach ($old_node as $field => $value) {
+        // An explicit NULL in the source data means to wipe to old value (i.e.,
+        // don't copy it over from $old_node)
+        if (property_exists($relation, $field) && $relation->$field === NULL) {
+          // Ignore this field
+        }
+        elseif (!isset($relation->$field)) {
+          $relation->$field = $old_relation->$field;
+        }
+      }
+    }
+
+    // Invoke migration prepare handlers
+    $this->prepare($relation, $row);
+
+    if (isset($relation->rid) && empty($relation->is_new)) {
+      $updating = TRUE;
+    }
+    else {
+      $updating = FALSE;
+    }
+
+    // Save relation object
+    migrate_instrument_start('relation_save');
+    $rid = relation_save($relation);
+    migrate_instrument_stop('relation_save');
+
+    if (isset($relation->rid)) {
+      if ($updating) {
+        $this->numUpdated++;
+      }
+      else {
+        $this->numCreated++;
+      }
+
+      // Update changed and created dates if needed.
+      if (isset($changed)) {
+        db_update('relation')
+          ->fields(array('changed' => $changed))
+          ->condition('rid', $relation->rid)
+          ->execute();
+        $relation->changed = $changed;
+      }
+
+      if (isset($created)) {
+        db_update('relation')
+          ->fields(array('created' => $created))
+          ->condition('rid', $relation->rid)
+          ->execute();
+        $relation->created = $created;
+      }
+
+      $return = array($relation->rid);
+    }
+    else {
+      $return = FALSE;
+    }
+
+    $this->complete($relation, $row);
+    return $return;
+  }
+}
diff --git a/relation_migrate/relation_migrate.info b/relation_migrate/relation_migrate.info
new file mode 100644
index 0000000..b0ccbe6
--- /dev/null
+++ b/relation_migrate/relation_migrate.info
@@ -0,0 +1,12 @@
+name = Relation migrate
+description = Migrate integration module for Relation.
+core = 7.x
+package = Relation
+
+files[] = relation_migrate.destination.inc
+files[] = relation_migrate.source.inc
+files[] = relation_migrate.migration.inc
+
+dependencies[] = relation
+dependencies[] = relation_ui
+dependencies[] = migrate
diff --git a/relation_migrate/relation_migrate.migration.inc b/relation_migrate/relation_migrate.migration.inc
new file mode 100644
index 0000000..7e39610
--- /dev/null
+++ b/relation_migrate/relation_migrate.migration.inc
@@ -0,0 +1,83 @@
+<?php
+
+/**
+ * @files
+ * Migration for entityreference fields.
+ */
+
+abstract class RelationMigrateReference extends Migration {
+  /**
+   * Constructor.
+   * 
+   * @param $field_type Field type machine name.
+   */
+  public function __construct($field_type) {
+    parent::__construct();
+    $this->fields = array_filter(variable_get('relation_migrate_' . $field_type . '_fields', array()));
+    $this->relation_type = variable_get('relation_migrate_' . $field_type . '_relation_type', NULL);
+    $this->dependencies = array();
+    $this->description = 'Copy the contents from the ' . $field_type . ' fields to relation entities.';
+    $this->map = new MigrateSQLMap($this->machineName,
+      array (
+        'source_type' => array (
+          'type' => 'varchar',
+          'length' => 128,
+          'not null' => TRUE,
+        ),
+        'source_id' => array(
+          'type' => 'int',
+          'unsigned' => TRUE,
+          'not null' => TRUE,
+        ),
+        'destination_type' => array (
+          'type' => 'varchar',
+          'length' => 128,
+          'not null' => TRUE,
+        ),
+        'destination_id' => array(
+          'type' => 'int',
+          'unsigned' => TRUE,
+          'not null' => TRUE,
+        ),
+      ),
+      MigrateDestinationRelation::getKeySchema()
+    );
+    
+    $this->destination = new MigrateDestinationRelation($this->relation_type);
+  }
+
+  public function prepare(stdClass $relation, stdClass $source_row) {
+    $relation->endpoints[LANGUAGE_NONE] = array(
+      array('entity_type' => $source_row->source_type, 'entity_id' => $source_row->source_id),
+      array('entity_type' => $source_row->destination_type, 'entity_id' => $source_row->destination_id),
+    );
+  }
+}
+
+class RelationMigrateEntityReference extends RelationMigrateReference {
+  public function __construct() {
+    parent::__construct('entityreference');
+    $this->source = new MigrateSourceEntityReference($this->fields);    
+  }
+}
+
+class RelationMigrateNodeReference extends RelationMigrateReference {
+  public function __construct() {
+    parent::__construct('node_reference');
+    $this->source = new MigrateSourceNodeReference($this->fields);    
+  }
+}
+
+class RelationMigrateUserReference extends RelationMigrateReference {
+  public function __construct() {
+    parent::__construct('user_reference');
+    $this->source = new MigrateSourceUserReference($this->fields);    
+  }
+}
+
+class RelationMigrateTermReference extends RelationMigrateReference {
+  public function __construct() {
+    parent::__construct('taxonomy_term_reference');
+    $this->source = new MigrateSourceTermReference($this->fields);    
+  }
+}
diff --git a/relation_migrate/relation_migrate.module b/relation_migrate/relation_migrate.module
new file mode 100644
index 0000000..7c271f8
--- /dev/null
+++ b/relation_migrate/relation_migrate.module
@@ -0,0 +1,126 @@
+<?php
+
+
+/**
+ * Implements hook_menu().
+ */
+function relation_migrate_menu() {
+  $items['admin/structure/relation/migrate'] = array(
+    'title' => 'Migration',
+    'access arguments' => array('administer relation types'),
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('relation_migrate_configuration_form'),
+    'description' => 'Configure migration between *reference fields and relations.',
+    'type' => MENU_LOCAL_TASK,
+  );
+
+  return $items;
+}
+
+/**
+ * Configuration form callback.
+ */
+function relation_migrate_configuration_form($form, &$form_state) {
+  $field_types = array(
+    'entityreference',
+    'taxonomy_term_reference',
+    'node_reference',
+    'user_reference',
+  );
+
+  foreach ($field_types as $field_type_name) {
+    $field_type_info = field_info_field_types($field_type_name);
+    $fields = field_read_fields(array('type' => $field_type_name));
+    if (!empty($field_type_info) && !empty($fields)) {
+      $form[$field_type_name] = array(
+        '#type' => 'fieldset',
+        '#title' => check_plain($field_type_info['label']),
+      );
+
+      $options = array();
+      foreach ($fields as $name => $field) {
+        $options[$name] = check_plain($name);
+      }
+
+      $form[$field_type_name]['relation_migrate_' . $field_type_name . '_fields'] = array(
+        '#type' => 'checkboxes',
+        '#title' => t('Fields'),
+        '#options' => $options,
+        '#default_value' => variable_get('relation_migrate_' . $field_type_name . '_fields', array()),
+        '#description' => t('Select fields of type %type, that should be migrated to relation entites.', array('%type' => $field_type_info['label'])),
+      );
+
+      $types = relation_get_types();
+      $rel_types = array();
+      foreach ($types as $machine_name => $type) {
+        $rel_types[$machine_name] = check_plain($type->label);
+      }
+
+      $form[$field_type_name]['relation_migrate_' . $field_type_name . '_relation_type'] = array(
+        '#type' => 'select',
+        '#title' => t('Relation type'),
+        '#options' => $rel_types,
+        '#default_value' => variable_get('relation_migrate_' . $field_type_name . '_relation_type', NULL),
+        '#description' => t('Select relation type that should be used when migrating reference fields.'),
+      	'#element_validate' => array('_relation_migrate_validate_type'),
+      );
+    }
+  }
+
+  return system_settings_form($form);
+}
+
+/**
+ * Validates relation type selection on configuration form.
+ *
+ * Check if selected relation type allows usage of source bundle.
+ */
+function _relation_migrate_validate_type($element, &$form_state, $form) {
+  if (!empty($form_state['input']['relation_migrate_' . $element['#array_parents'][0] . '_relation_type'])) {
+    module_load_include('inc', 'relation_migrate', 'relation_migrate.modules');
+    $field_type = field_info_field_types($element['#array_parents'][0]);
+    $relation_type = relation_type_load($form_state['input']['relation_migrate_' . $element['#array_parents'][0] . '_relation_type']);
+  
+    $function = $field_type['module'] . '_relation_migrate_type_target_validate';
+    if (function_exists($function)) {
+      if (!$function($element, $form_state, $form) || !_relation_migrate_validate_type_source($form_state['input']['relation_migrate_' . $element['#array_parents'][0] . '_fields'], $relation_type)) {
+        form_error($element, t('Relation type %relation_type cannot be used with one of the selected %field_type fields. <a href="@rel_type_url">Check allowed source/target bundles for the relation type</a>.', array('%relation_type' => $relation_type->label, '%field_type' => $field_type['label'], '@rel_type_url' => url('admin/structure/relation/manage/' . $relation_type->relation_type . '/edit'))));
+      }
+    }
+  }
+}
+
+/**
+ * Checks if selected relation type supports all possible source bundles of a
+ * given field.
+ */
+function _relation_migrate_validate_type_source($fields, $relation_type) {
+  $allowed_bundles = $relation_type->source_bundles;
+  $fields = array_filter($fields);
+  
+  foreach ($fields as $field_name) {
+    $field = field_info_field($field_name);
+    foreach ($field['bundles'] as $entity_type => $bundles) {
+      if (!in_array($entity_type . ':*', $allowed_bundles)) {
+        foreach($bundles as $bundle) {
+          if (!in_array($entity_type . ':' . $bundle, $allowed_bundles)) {
+            return FALSE;
+          }
+        }
+      }
+    }
+  }
+  
+  return TRUE;
+}
+
+
+/**
+ * Implements hook_migrate_api().
+ */
+function relation_migrate_migrate_api() {
+  $api = array(
+    'api' => 2,
+  );
+  return $api;
+}
diff --git a/relation_migrate/relation_migrate.modules.inc b/relation_migrate/relation_migrate.modules.inc
new file mode 100644
index 0000000..dc596a8
--- /dev/null
+++ b/relation_migrate/relation_migrate.modules.inc
@@ -0,0 +1,86 @@
+<?php
+
+/**
+ * @files
+ * Hook implementations in behalf of core and supported contrib modules.
+ */
+
+/**
+ * Implements hook_relation_migrate_type_validate().
+ */
+function taxonomy_relation_migrate_type_target_validate($element, $form_state, $form) {
+  $fields = array_filter($form_state['input']['relation_migrate_taxonomy_term_reference_fields']);
+  $relation_type = relation_type_load($form_state['input']['relation_migrate_taxonomy_term_reference_relation_type']);
+  $supported_bundles = $relation_type->directional ? $relation_type->target_bundles : $relation_type->source_bundles;
+
+  $return = TRUE;
+  foreach ($fields as $field) {
+    $field_def = field_info_field($field);
+    $return &= in_array('taxonomy_term:' . $field_def['settings']['allowed_values'][0]['vocabulary'], $supported_bundles);
+  }
+
+  return in_array('taxonomy_term:*', $supported_bundles) || $return;
+}
+
+/**
+ * Implements hook_relation_migrate_type_validate().
+ */
+function user_reference_relation_migrate_type_target_validate($element, $form_state, $form) {
+  $fields = array_filter($form_state['input']['relation_migrate_user_reference_fields']);
+  if (empty($fields)) {
+    return TRUE;
+  }
+
+  $relation_type = relation_type_load($form_state['input']['relation_migrate_user_reference_relation_type']);
+  $supported_bundles = $relation_type->directional ? $relation_type->target_bundles : $relation_type->source_bundles;
+  foreach ($supported_bundles as $bundle) {
+    if (strpos($bundle, 'user:') !== FALSE) {
+      return TRUE;
+    }
+  }
+
+  return FALSE;
+}
+
+/**
+ * Implements hook_relation_migrate_type_validate().
+ */
+function node_reference_relation_migrate_type_target_validate($element, $form_state, $form) {
+  $fields = array_filter($form_state['input']['relation_migrate_node_reference_fields']);
+  $relation_type = relation_type_load($form_state['input']['relation_migrate_node_reference_relation_type']);
+  $supported_bundles = $relation_type->directional ? $relation_type->target_bundles : $relation_type->source_bundles;
+
+  $return = TRUE;
+  foreach ($fields as $field) {
+    $field_def = field_info_field($field);
+    $node_types = array_filter($field_def['settings']['referenceable_types']);
+    foreach ($node_types as $node_type) {
+      $return &= in_array('node:' . $node_type, $supported_bundles);
+    }
+  }
+
+  return in_array('node:*', $supported_bundles) || $return;
+}
+
+/**
+ * Implements hook_relation_migrate_type_validate().
+ */
+function entityreference_relation_migrate_type_target_validate($element, $form_state, $form) {
+  $fields = array_filter($form_state['input']['relation_migrate_entityreference_fields']);
+  $relation_type = relation_type_load($form_state['input']['relation_migrate_entityreference_relation_type']);
+  $supported_bundles = $relation_type->directional ? $relation_type->target_bundles : $relation_type->source_bundles;
+
+  $return = TRUE;
+  foreach ($fields as $field) {
+    $field_def = field_info_field($field);
+    $entity_type = $field_def['settings']['target_type'];
+    $bundles = array_filter($field_def['settings']['handler_settings']['target_bundles']);
+    $bundles_allowed = TRUE;
+    foreach ($bundles as $bundle) {
+      $bundles_allowed &= in_array($entity_type . ':' . $bundle, $supported_bundles);
+    }
+    $return &= in_array($entity_type . ':*', $supported_bundles) || $bundles_allowed;
+  }
+
+  return $return;
+}
diff --git a/relation_migrate/relation_migrate.source.inc b/relation_migrate/relation_migrate.source.inc
new file mode 100644
index 0000000..62f13b7
--- /dev/null
+++ b/relation_migrate/relation_migrate.source.inc
@@ -0,0 +1,242 @@
+<?php
+
+/**
+ * @file
+ * Source plugin for *reference fields.
+ */
+
+/**
+ * Migration source for *ference field. This source is primary used in
+ * relation_migrate to convert *reference entries into relation entities.
+ */
+abstract class MigrateSourceReference extends MigrateSource {
+
+  /**
+   * Place where data is stored during import.
+   */
+  protected $result = array();
+
+  /**
+   * ID of a row, that will be imported during next iteration.
+   */
+  protected $next_row = 0;
+
+  /**
+   * Machine names of fields that will be imported.
+   */
+  protected $fields = array();
+  
+  /**
+   * Field type.
+   */
+  protected $field_type;
+  
+  /**
+   * Constructor.
+   *
+   * @param string $field Field type machine name.
+   * @param array $fields List of fields to be migrated.
+   */
+  public function __construct($field_type, array $fields, array $options = array()) {
+    parent::__construct($options);
+    $this->fields = $fields;
+    $this->field_type = $field_type;
+  }
+
+  /**
+   * Return a string representing the source, for display in the UI.
+   */
+  public function __toString() {
+    return t('Migrate %type fields: %fields', array('%type' => $this->field_type, '%fields' => implode(',', $this->fields)));
+  }
+
+  /**
+   * Returns a list of fields available to be mapped from the source,
+   * keyed by field name.
+   */
+  public function fields() {
+    return array(
+      'source_type' => t('Source entity type'),
+      'source_id' => t('Source entity ID'),
+      'destination_type' => t('Destination entity type'),
+      'destination_id' => t('Destination entity ID'),
+      'field_name' => t('Field name'),
+    );
+  }
+
+  /**
+   * Return the number of available source records.
+   */
+  public function computeCount() {
+    $rows_count = 0;
+    foreach ($this->fields as $field_name) {
+      $rows_count += db_query('SELECT count(*) FROM {field_data_' . $field_name . '} WHERE deleted = 0')->fetchField();
+    }
+    return $rows_count;
+  }
+
+  /**
+   * Do whatever needs to be done to start a fresh traversal of the source data.
+   */
+  public function performRewind() {
+    $this->result = array();
+    $this->next_row = 0;
+
+    // Load data for each field and merge all records in result array.
+    foreach ($this->fields as $field_name) {
+      $field_info = field_read_field($field_name);
+      $columns = array_keys($field_info['columns']);
+      
+      if (!empty($field_info) && $field_info['type'] == $this->field_type) {
+        $field_data = db_select('field_data_' . $field_name, 'f')
+          ->fields('f', array('entity_type', 'entity_id', $field_name . '_' . $columns[0]))
+          ->condition('deleted', 0);
+        $field_data->addExpression(":name", 'field_name', array(':name' => $field_name));
+        $field_data = $field_data->execute()->fetchAll();
+
+        $this->result = array_merge($this->result, $field_data);
+      }
+    }
+
+  }
+  
+  /**
+   * Constructs row object, that should be returned from $this->getNextRow().
+   * 
+   * @param stdClass $item Row item as returned from DB.
+   * @param string $destination_type Destiantion entity type.
+   * @param string $field_name Field's machine name.
+   */
+  protected function _constructRow(stdClass $item, $destination_type, $field_name) {
+      $field_info = field_read_field($field_name);
+      $columns = array_keys($field_info['columns']);
+      $id_key = $field_name . '_' . $columns[0];
+
+      $ret = array(
+        'source_type' => $item->entity_type,
+        'source_id' => $item->entity_id,
+        'destination_type' => $destination_type,
+        'destination_id' => $item->{$id_key},
+        'field_name' => $field_name,
+      );
+      
+      return (object)$ret;
+  }
+}
+
+/**
+ * Source migration plugin for entityreference.
+ */
+class MigrateSourceEntityReference extends MigrateSourceReference {
+  /**
+   * Constructor.
+   * 
+   * @param array $fields List of fields to be migrated.
+   */
+  function __construct(array $fields, array $options = array()) {
+    parent::__construct('entityreference', $fields, $options);
+  }
+
+  /**
+   * Fetch the next row of data, returning it as an object. Return FALSE
+   * when there is no more data available.
+   */
+  public function getNextRow() {
+    if (!empty($this->result[$this->next_row])) {
+      $item = $this->result[$this->next_row];
+      $dest_type = field_read_field($item->field_name);
+      $this->next_row++;
+
+      return $this->_constructRow($item, $dest_type['settings']['target_type'], $item->field_name);
+    }
+
+    return FALSE;
+  }
+}
+
+/**
+ * Source migration plugin for node_reference.
+ */
+class MigrateSourceNodeReference extends MigrateSourceReference {
+  /**
+   * Constructor.
+   * 
+   * @param array $fields List of fields to be migrated.
+   */
+  function __construct(array $fields, array $options = array()) {
+    parent::__construct('node_reference', $fields, $options);
+  }
+
+  /**
+   * Fetch the next row of data, returning it as an object. Return FALSE
+   * when there is no more data available.
+   */
+  public function getNextRow() {
+    if (!empty($this->result[$this->next_row])) {
+      $item = $this->result[$this->next_row];
+      $this->next_row++;
+
+      return $this->_constructRow($item, 'node', $item->field_name);
+    }
+
+    return FALSE;
+  }
+}
+
+/**
+ * Source migration plugin for user_reference.
+ */
+class MigrateSourceUserReference extends MigrateSourceReference {
+  /**
+   * Constructor.
+   * 
+   * @param array $fields List of fields to be migrated.
+   */
+  function __construct(array $fields, array $options = array()) {
+    parent::__construct('user_reference', $fields, $options);
+  }
+
+  /**
+   * Fetch the next row of data, returning it as an object. Return FALSE
+   * when there is no more data available.
+   */
+  public function getNextRow() {
+    if (!empty($this->result[$this->next_row])) {
+      $item = $this->result[$this->next_row];
+      $this->next_row++;
+
+      return $this->_constructRow($item, 'user', $item->field_name);
+    }
+
+    return FALSE;
+  }
+}
+
+/**
+ * Source migration plugin for taxonomy_term_reference.
+ */
+class MigrateSourceTermReference extends MigrateSourceReference {
+  /**
+   * Constructor.
+   * 
+   * @param array $fields List of fields to be migrated.
+   */
+  function __construct(array $fields, array $options = array()) {
+    parent::__construct('taxonomy_term_reference', $fields, $options);
+  }
+
+  /**
+   * Fetch the next row of data, returning it as an object. Return FALSE
+   * when there is no more data available.
+   */
+  public function getNextRow() {
+    if (!empty($this->result[$this->next_row])) {
+      $item = $this->result[$this->next_row];
+      $this->next_row++;
+
+      return $this->_constructRow($item, 'taxonomy_term', $item->field_name);
+    }
+
+    return FALSE;
+  }
+}
\ No newline at end of file
