【发布时间】:2011-05-28 07:44:31
【问题描述】:
我正在使用migrate module 将数据从多个来源复制到新的drupal 安装。到目前为止,我能够从模块提供的示例中复制很多我需要的东西。我目前一直在为新创建的节点添加术语或分类。示例显示:
// These are related terms, which by default will be looked up by name
$this->addFieldMapping('migrate_example_beer_styles', 'terms')
->separator(',');
我已经找到了 migrate_example_beer_styles 目标映射,它似乎是该分类的 machine name。
我尝试用我的machine_name 的每一个变体来模仿这种行为,但这些术语似乎从未关联:
按编号:
// where source breed_id is '1,100' - it finds mapped values accordingly
$this->addFieldMapping('breeds', 'breed_id')
->sourceMigration('BreedMigration')
->separator(',')
而且,按名称:
// where source breeds is 'Dogs,German Shepherd'
$this->addFieldMapping('breeds', 'breeds')
->separator(',');
假设目标映射是分类的machine name,我错了吗?
这个版本的migrate module最近发布了,我在网上没有找到任何其他有用的例子。
【问题讨论】: