We're updating the issue view to help you get more done. 

Data Importer: entitySplitter refinery returning the wrong entities

Description

Hi All,
I have an import mapping for occurrences that relate to entities and the recent change to support mappings using ca_tablename.idno (382b3905633d4beb3a05ef6ac78c9ce5844868f4) seems to have broken the relationship mappings using the entitySplitter refinery.

What seems to be happenning is that DataMigrationUtils::getEntityID() is finding the correct entity but it is then returning the ID of the entity label rather than the id of the entity. I thought I was going nuts until I did a query on the ca_entity_labels table limiting to the relevant entity names.

The debug log gave me:

2013-08-22 13:23:05 - DEBUG --> Found existing entity J.L./Barnard in DataMigrationUtils::getEntityID(); total of 1 entities were found

But then viewing the record the related entity is listed as "Jones, I.P."

select label_id, entity_id, forename, surname, displayname, locale_id from ca_entity_labels where surname like '%barnard%' or surname like '%jones%';

---------------------------------------+-------------------------

label_id

entity_id

forename

surname

displayname

locale_id

---------------------------------------+-------------------------

8

9

 

Barnard

Barnard

2

17

18

 

Jones

Jones

2

310

311

I.P.

Jones

Jones, I.P.

2

311

312

J.L.

Barnard

Barnard, J.L.

2

---------------------------------------+-------------------------

My mapping looks like this

Rule type Source CA table.element Group Options Refinery Refinery parameters Original values Replacement values Source description Notes
Mapping 20 ca_entities entitySplitter {"delimiter":"&", "entityType" : "ind","relationshipType":"identifiedBy"} Verbatim

Environment

Ubuntu 12.04 PHP 5.4

Activity

Show:
User known
August 22, 2013, 6:12 AM

Ugh, I see the problem. There's a fix for this on GitHub now.

Kehan Harman
August 22, 2013, 10:38 PM

Thanks works for me

Fixed

Assignee

User known

Reporter

Kehan Harman

Labels

Components

Affects versions

Priority

Major
Configure