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>SpeciesLink</organizationname></party></datasource_id>
4 5
        <locationevent_id>
5 6
            <locationevent>
6 7
                <location_id>
7 8
                    <location>
9
                        <datasource_id><party><organizationname>SpeciesLink</organizationname></party></datasource_id>
8 10
                        <locationdetermination>
9 11
                            <namedplace_id>
10 12
                                <namedplace>
......
38 40
                        <elevationrange>0.0</elevationrange>
39 41
                        <centerlatitude>-6.73845</centerlatitude>
40 42
                        <centerlongitude>-35.1385666667</centerlongitude>
43
                        <sourceaccessioncode>96848826</sourceaccessioncode>
41 44
                    </location>
42 45
                </location_id>
43 46
                <obsstartdate>2009-09-09</obsstartdate>
44 47
                <obsenddate/>
45 48
            </locationevent>
46 49
        </locationevent_id>
47
        <collectioncode_dwc>JPB</collectioncode_dwc>
50
        <collectionnumber>27</collectionnumber>
48 51
        <description>&#193;rvore; ca. de 4,5m Alt.; bot&#227;o floral com colora&#231;ao verde.</description>
49 52
        <taxondetermination>
50 53
            <role>identifier</role>
......
100 103
            </plantconcept_id>
101 104
        </taxondetermination>
102 105
        <verbatimcollectorname>Silva, F.O.</verbatimcollectorname>
103
        <datasource_id><party><organizationname>SpeciesLink</organizationname></party></datasource_id>
104 106
        <catalognumber_dwc>43226</catalognumber_dwc>
105
        <collectionnumber>27</collectionnumber>
107
        <collectioncode_dwc>JPB</collectioncode_dwc>
106 108
        <institution_id><party><organizationname>UFPB</organizationname></party></institution_id>
107 109
        <sourceaccessioncode>96848826</sourceaccessioncode>
108 110
    </specimenreplicate>
109 111
    <specimenreplicate id="1">
112
        <datasource_id><party><organizationname>SpeciesLink</organizationname></party></datasource_id>
110 113
        <locationevent_id>
111 114
            <locationevent>
112 115
                <location_id>
113 116
                    <location>
117
                        <datasource_id><party><organizationname>SpeciesLink</organizationname></party></datasource_id>
114 118
                        <locationdetermination>
115 119
                            <namedplace_id>
116 120
                                <namedplace>
......
142 146
                        <locationnarrative>Mata de Igap&#243;. Margens inundadas.</locationnarrative>
143 147
                        <centerlatitude>-2.8333333333</centerlatitude>
144 148
                        <centerlongitude>-67.8333333333</centerlongitude>
149
                        <sourceaccessioncode>96848863</sourceaccessioncode>
145 150
                    </location>
146 151
                </location_id>
147 152
                <obsstartdate>1986-11-18</obsstartdate>
148 153
                <obsenddate/>
149 154
            </locationevent>
150 155
        </locationevent_id>
151
        <collectioncode_dwc>JPB</collectioncode_dwc>
156
        <collectionnumber>2745</collectionnumber>
152 157
        <description>&#193;rvore pequena com 5m de altura; frutos jovens esverdeados. Boca do rio Tonantins, abaixo de Vila Velha. Frequente.</description>
153 158
        <taxondetermination>
154 159
            <role>identifier</role>
......
204 209
            </plantconcept_id>
205 210
        </taxondetermination>
206 211
        <verbatimcollectorname>Lima, H.C.</verbatimcollectorname>
207
        <datasource_id><party><organizationname>SpeciesLink</organizationname></party></datasource_id>
208 212
        <catalognumber_dwc>14046</catalognumber_dwc>
209
        <collectionnumber>2745</collectionnumber>
213
        <collectioncode_dwc>JPB</collectioncode_dwc>
210 214
        <institution_id><party><organizationname>UFPB</organizationname></party></institution_id>
211 215
        <sourceaccessioncode>96848863</sourceaccessioncode>
212 216
    </specimenreplicate>

Also available in: Unified diff