Project

General

Profile

« Previous | Next » 

Revision 3203

VegBIEN: Fixing import issue related to duplicate entries in tables with children, where when a new table entry duplicates an existing entry, the 1:1 tables of that table and those tables' children are not merged, causing them to become orphaned. It is described in detail at <https://projects.nceas.ucsb.edu/nceas/projects/bien/wiki/Import_issues#Merging-duplicates-with-children&gt;, including the rationale for this solution. Note that this is not a bug in column-based import, it applies to row-based import as well. This commit fixes the issue for specimenreplicate->...->location, by also mapping specimenreplicate's unique keys to location.sourceaccessioncode and setting location.datasource_id.

View differences:

VegBIEN.specimens.xml.ref
1 1
<?xml version="1.0" ?>
2 2
<VegBIEN>
3 3
    <specimenreplicate id="0">
4
        <datasource_id><party><organizationname>GBIF</organizationname></party></datasource_id>
4 5
        <locationevent_id>
5 6
            <locationevent>
6 7
                <location_id>
7 8
                    <location>
9
                        <datasource_id><party><organizationname>GBIF</organizationname></party></datasource_id>
8 10
                        <locationdetermination>
9 11
                            <namedplace_id>
10 12
                                <namedplace>
......
13 15
                                </namedplace>
14 16
                            </namedplace_id>
15 17
                        </locationdetermination>
18
                        <sourceaccessioncode>GOET-Typen; Type herbarium, Gottingen (GOET); 3390</sourceaccessioncode>
16 19
                    </location>
17 20
                </location_id>
18 21
            </locationevent>
19 22
        </locationevent_id>
20
        <collectioncode_dwc>Type herbarium, Gottingen (GOET)</collectioncode_dwc>
21 23
        <taxondetermination>
22 24
            <isoriginal>true</isoriginal>
23 25
            <iscurrent>true</iscurrent>
......
58 60
            </plantconcept_id>
59 61
        </taxondetermination>
60 62
        <verbatimcollectorname>PRINGLE</verbatimcollectorname>
61
        <datasource_id><party><organizationname>GBIF</organizationname></party></datasource_id>
62 63
        <catalognumber_dwc>3390</catalognumber_dwc>
64
        <collectioncode_dwc>Type herbarium, Gottingen (GOET)</collectioncode_dwc>
63 65
        <institution_id><party><organizationname>GOET-Typen</organizationname></party></institution_id>
64 66
    </specimenreplicate>
65 67
    <specimenreplicate id="1">
68
        <datasource_id><party><organizationname>GBIF</organizationname></party></datasource_id>
66 69
        <locationevent_id>
67 70
            <locationevent>
68 71
                <location_id>
69 72
                    <location>
73
                        <datasource_id><party><organizationname>GBIF</organizationname></party></datasource_id>
70 74
                        <locationdetermination>
71 75
                            <namedplace_id>
72 76
                                <namedplace>
......
75 79
                                </namedplace>
76 80
                            </namedplace_id>
77 81
                        </locationdetermination>
82
                        <sourceaccessioncode>GOET-Typen; Type herbarium, Gottingen (GOET); 3395</sourceaccessioncode>
78 83
                    </location>
79 84
                </location_id>
80 85
            </locationevent>
81 86
        </locationevent_id>
82
        <collectioncode_dwc>Type herbarium, Gottingen (GOET)</collectioncode_dwc>
83 87
        <taxondetermination>
84 88
            <isoriginal>true</isoriginal>
85 89
            <iscurrent>true</iscurrent>
......
120 124
            </plantconcept_id>
121 125
        </taxondetermination>
122 126
        <verbatimcollectorname>ANDERSSON</verbatimcollectorname>
123
        <datasource_id><party><organizationname>GBIF</organizationname></party></datasource_id>
124 127
        <catalognumber_dwc>3395</catalognumber_dwc>
128
        <collectioncode_dwc>Type herbarium, Gottingen (GOET)</collectioncode_dwc>
125 129
        <institution_id><party><organizationname>GOET-Typen</organizationname></party></institution_id>
126 130
    </specimenreplicate>
127 131
</VegBIEN>

Also available in: Unified diff