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>QMOR</organizationname></party></datasource_id>
4 5
        <locationevent_id>
5 6
            <locationevent>
6 7
                <location_id>
7 8
                    <location>
9
                        <datasource_id><party><organizationname>QMOR</organizationname></party></datasource_id>
8 10
                        <locationdetermination>
9 11
                            <namedplace_id>
10 12
                                <namedplace>
......
26 28
                            </namedplace_id>
27 29
                        </locationdetermination>
28 30
                        <locationnarrative>Rigaud</locationnarrative>
31
                        <sourceaccessioncode>1</sourceaccessioncode>
29 32
                    </location>
30 33
                </location_id>
31 34
                <obsstartdate>1938-06-02</obsstartdate>
32 35
                <obsenddate/>
33 36
            </locationevent>
34 37
        </locationevent_id>
35
        <collectioncode_dwc>QMOR</collectioncode_dwc>
38
        <collectionnumber>urn:lsid:biocol.org:col:34164</collectionnumber>
36 39
        <definedvalue fkey="tablerecord_id">
37 40
            <userdefined_id>
38 41
                <userdefined>
......
107 110
            </plantconcept_id>
108 111
        </taxondetermination>
109 112
        <verbatimcollectorname>Robert, Adrien</verbatimcollectorname>
110
        <datasource_id><party><organizationname>QMOR</organizationname></party></datasource_id>
111 113
        <catalognumber_dwc>QMOR00000001</catalognumber_dwc>
112
        <collectionnumber>urn:lsid:biocol.org:col:34164</collectionnumber>
114
        <collectioncode_dwc>QMOR</collectioncode_dwc>
113 115
        <institution_id><party><organizationname>Universit&#233; de Montr&#233;al Biodiversity Centre</organizationname></party></institution_id>
114 116
        <sourceaccessioncode>1</sourceaccessioncode>
115 117
    </specimenreplicate>
116 118
    <specimenreplicate id="1">
119
        <datasource_id><party><organizationname>QMOR</organizationname></party></datasource_id>
117 120
        <locationevent_id>
118 121
            <locationevent>
119 122
                <location_id>
120 123
                    <location>
124
                        <datasource_id><party><organizationname>QMOR</organizationname></party></datasource_id>
121 125
                        <locationdetermination>
122 126
                            <namedplace_id>
123 127
                                <namedplace>
......
139 143
                            </namedplace_id>
140 144
                        </locationdetermination>
141 145
                        <locationnarrative>La Trappe</locationnarrative>
146
                        <sourceaccessioncode>2</sourceaccessioncode>
142 147
                    </location>
143 148
                </location_id>
144 149
                <obsstartdate>1942-06-05</obsstartdate>
145 150
                <obsenddate/>
146 151
            </locationevent>
147 152
        </locationevent_id>
148
        <collectioncode_dwc>QMOR</collectioncode_dwc>
153
        <collectionnumber>urn:lsid:biocol.org:col:34164</collectionnumber>
149 154
        <definedvalue fkey="tablerecord_id">
150 155
            <userdefined_id>
151 156
                <userdefined>
......
220 225
            </plantconcept_id>
221 226
        </taxondetermination>
222 227
        <verbatimcollectorname>Ouellet, Joseph</verbatimcollectorname>
223
        <datasource_id><party><organizationname>QMOR</organizationname></party></datasource_id>
224 228
        <catalognumber_dwc>QMOR00000002</catalognumber_dwc>
225
        <collectionnumber>urn:lsid:biocol.org:col:34164</collectionnumber>
229
        <collectioncode_dwc>QMOR</collectioncode_dwc>
226 230
        <institution_id><party><organizationname>Universit&#233; de Montr&#233;al Biodiversity Centre</organizationname></party></institution_id>
227 231
        <sourceaccessioncode>2</sourceaccessioncode>
228 232
    </specimenreplicate>

Also available in: Unified diff