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>XAL</organizationname></party></datasource_id>
4 5
        <locationevent_id>
5 6
            <locationevent>
6 7
                <location_id>
7 8
                    <location>
9
                        <datasource_id><party><organizationname>XAL</organizationname></party></datasource_id>
8 10
                        <locationdetermination>
9 11
                            <namedplace_id>
10 12
                                <namedplace>
......
38 40
                        <elevationrange/>
39 41
                        <centerlatitude>22.267</centerlatitude>
40 42
                        <centerlongitude>-104.633</centerlongitude>
43
                        <sourceaccessioncode>IE; XAL; K400001</sourceaccessioncode>
41 44
                    </location>
42 45
                </location_id>
43 46
                <waterdepth>1000.0</waterdepth>
......
45 48
                <obsenddate/>
46 49
            </locationevent>
47 50
        </locationevent_id>
48
        <collectioncode_dwc>XAL</collectioncode_dwc>
51
        <collectionnumber>7086</collectionnumber>
49 52
        <definedvalue fkey="tablerecord_id">
50 53
            <userdefined_id>
51 54
                <userdefined>
......
120 123
            </plantconcept_id>
121 124
        </taxondetermination>
122 125
        <verbatimcollectorname>J.A. Machuca N.</verbatimcollectorname>
123
        <datasource_id><party><organizationname>XAL</organizationname></party></datasource_id>
124 126
        <catalognumber_dwc>K400001</catalognumber_dwc>
125
        <collectionnumber>7086</collectionnumber>
127
        <collectioncode_dwc>XAL</collectioncode_dwc>
126 128
        <institution_id><party><organizationname>IE</organizationname></party></institution_id>
127 129
    </specimenreplicate>
128 130
    <specimenreplicate id="1">
131
        <datasource_id><party><organizationname>XAL</organizationname></party></datasource_id>
129 132
        <locationevent_id>
130 133
            <locationevent>
131 134
                <location_id>
132 135
                    <location>
136
                        <datasource_id><party><organizationname>XAL</organizationname></party></datasource_id>
133 137
                        <locationdetermination>
134 138
                            <namedplace_id>
135 139
                                <namedplace>
......
163 167
                        <elevationrange/>
164 168
                        <centerlatitude>17.644</centerlatitude>
165 169
                        <centerlongitude>-96.529</centerlongitude>
170
                        <sourceaccessioncode>IE; XAL; K400002</sourceaccessioncode>
166 171
                    </location>
167 172
                </location_id>
168 173
                <waterdepth>2430.0</waterdepth>
......
170 175
                <obsenddate/>
171 176
            </locationevent>
172 177
        </locationevent_id>
173
        <collectioncode_dwc>XAL</collectioncode_dwc>
178
        <collectionnumber>1216</collectionnumber>
174 179
        <definedvalue fkey="tablerecord_id">
175 180
            <userdefined_id>
176 181
                <userdefined>
......
245 250
            </plantconcept_id>
246 251
        </taxondetermination>
247 252
        <verbatimcollectorname>C. Gallardo H. y  et al.</verbatimcollectorname>
248
        <datasource_id><party><organizationname>XAL</organizationname></party></datasource_id>
249 253
        <catalognumber_dwc>K400002</catalognumber_dwc>
250
        <collectionnumber>1216</collectionnumber>
254
        <collectioncode_dwc>XAL</collectioncode_dwc>
251 255
        <institution_id><party><organizationname>IE</organizationname></party></institution_id>
252 256
    </specimenreplicate>
253 257
</VegBIEN>

Also available in: Unified diff