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>U</organizationname></party></datasource_id>
4 5
        <locationevent_id>
5 6
            <locationevent>
6 7
                <location_id>
7 8
                    <location>
9
                        <datasource_id><party><organizationname>U</organizationname></party></datasource_id>
8 10
                        <locationdetermination>
9 11
                            <namedplace_id>
10 12
                                <namedplace>
......
18 20
                        <locationnarrative>Cayenne, Ile de Cayenne</locationnarrative>
19 21
                        <centerlatitude>4.933333333</centerlatitude>
20 22
                        <centerlongitude>-52.33333333</centerlongitude>
23
                        <sourceaccessioncode>2225</sourceaccessioncode>
21 24
                    </location>
22 25
                </location_id>
23 26
                <obsstartdate>1969-09-21</obsstartdate>
24 27
                <obsenddate/>
25 28
            </locationevent>
26 29
        </locationevent_id>
30
        <collectionnumber>7</collectionnumber>
27 31
        <taxondetermination>
28 32
            <role>identifier</role>
29 33
            <determinationdate>1979-01-01</determinationdate>
......
54 58
            </plantconcept_id>
55 59
        </taxondetermination>
56 60
        <verbatimcollectorname>Burgot, S.J.</verbatimcollectorname>
57
        <datasource_id><party><organizationname>U</organizationname></party></datasource_id>
58 61
        <catalognumber_dwc>U  0125259</catalognumber_dwc>
59
        <collectionnumber>7</collectionnumber>
60 62
        <sourceaccessioncode>2225</sourceaccessioncode>
61 63
    </specimenreplicate>
62 64
    <specimenreplicate id="1">
65
        <datasource_id><party><organizationname>U</organizationname></party></datasource_id>
63 66
        <locationevent_id>
64 67
            <locationevent>
65 68
                <location_id>
66 69
                    <location>
70
                        <datasource_id><party><organizationname>U</organizationname></party></datasource_id>
67 71
                        <locationdetermination>
68 72
                            <namedplace_id>
69 73
                                <namedplace>
......
77 81
                        <locationnarrative>Cayenne, Ile de Cayenne</locationnarrative>
78 82
                        <centerlatitude>4.933333333</centerlatitude>
79 83
                        <centerlongitude>-52.33333333</centerlongitude>
84
                        <sourceaccessioncode>44268708</sourceaccessioncode>
80 85
                    </location>
81 86
                </location_id>
82 87
                <obsstartdate>1970-09-21</obsstartdate>
83 88
                <obsenddate/>
84 89
            </locationevent>
85 90
        </locationevent_id>
91
        <collectionnumber>5</collectionnumber>
86 92
        <taxondetermination>
87 93
            <isoriginal>true</isoriginal>
88 94
            <iscurrent>true</iscurrent>
......
105 111
            </plantconcept_id>
106 112
        </taxondetermination>
107 113
        <verbatimcollectorname>Burgot, S.J.</verbatimcollectorname>
108
        <datasource_id><party><organizationname>U</organizationname></party></datasource_id>
109 114
        <catalognumber_dwc>U  0233032</catalognumber_dwc>
110
        <collectionnumber>5</collectionnumber>
111 115
        <sourceaccessioncode>44268708</sourceaccessioncode>
112 116
    </specimenreplicate>
113 117
</VegBIEN>

Also available in: Unified diff