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>REMIB</organizationname></party></datasource_id>
4 5
        <locationevent_id>
5 6
            <locationevent>
6 7
                <location_id>
7 8
                    <location>
9
                        <datasource_id><party><organizationname>REMIB</organizationname></party></datasource_id>
8 10
                        <locationdetermination>
9 11
                            <namedplace_id>
10 12
                                <namedplace>
......
30 32
                        <locationnarrative>ND; habitat: ND</locationnarrative>
31 33
                        <centerlatitude>99</centerlatitude>
32 34
                        <centerlongitude>-999</centerlongitude>
35
                        <sourceaccessioncode>1764</sourceaccessioncode>
33 36
                    </location>
34 37
                </location_id>
35 38
                <obsstartdate>1979-12-09</obsstartdate>
36 39
                <obsenddate/>
37 40
            </locationevent>
38 41
        </locationevent_id>
39
        <collectioncode_dwc>XAL</collectioncode_dwc>
40 42
        <taxondetermination>
41 43
            <isoriginal>true</isoriginal>
42 44
            <iscurrent>true</iscurrent>
......
65 67
            </plantconcept_id>
66 68
        </taxondetermination>
67 69
        <verbatimcollectorname>B. Guerrero C.</verbatimcollectorname>
68
        <datasource_id><party><organizationname>REMIB</organizationname></party></datasource_id>
70
        <collectioncode_dwc>XAL</collectioncode_dwc>
69 71
        <sourceaccessioncode>1764</sourceaccessioncode>
70 72
    </specimenreplicate>
71 73
    <specimenreplicate id="1">
74
        <datasource_id><party><organizationname>REMIB</organizationname></party></datasource_id>
72 75
        <locationevent_id>
73 76
            <locationevent>
74 77
                <location_id>
75 78
                    <location>
79
                        <datasource_id><party><organizationname>REMIB</organizationname></party></datasource_id>
76 80
                        <locationdetermination>
77 81
                            <namedplace_id>
78 82
                                <namedplace>
......
98 102
                        <locationnarrative>ND; habitat: ND</locationnarrative>
99 103
                        <centerlatitude>99</centerlatitude>
100 104
                        <centerlongitude>-999</centerlongitude>
105
                        <sourceaccessioncode>1479</sourceaccessioncode>
101 106
                    </location>
102 107
                </location_id>
103 108
                <obsstartdate>1982-02-11</obsstartdate>
104 109
                <obsenddate/>
105 110
            </locationevent>
106 111
        </locationevent_id>
107
        <collectioncode_dwc>XAL</collectioncode_dwc>
108 112
        <taxondetermination>
109 113
            <isoriginal>true</isoriginal>
110 114
            <iscurrent>true</iscurrent>
......
133 137
            </plantconcept_id>
134 138
        </taxondetermination>
135 139
        <verbatimcollectorname>J.I. Calzada</verbatimcollectorname>
136
        <datasource_id><party><organizationname>REMIB</organizationname></party></datasource_id>
140
        <collectioncode_dwc>XAL</collectioncode_dwc>
137 141
        <sourceaccessioncode>1479</sourceaccessioncode>
138 142
    </specimenreplicate>
139 143
</VegBIEN>

Also available in: Unified diff