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>UNCC</organizationname></party></datasource_id>
4 5
        <locationevent_id>
5 6
            <locationevent>
6 7
                <location_id>
7 8
                    <location>
9
                        <datasource_id><party><organizationname>UNCC</organizationname></party></datasource_id>
8 10
                        <locationdetermination>
9 11
                            <namedplace_id>
10 12
                                <namedplace>
......
19 21
                                </namedplace>
20 22
                            </namedplace_id>
21 23
                        </locationdetermination>
24
                        <sourceaccessioncode>34293</sourceaccessioncode>
22 25
                    </location>
23 26
                </location_id>
24 27
                <obsstartdate>1972-06-25</obsstartdate>
25 28
                <obsenddate/>
26 29
            </locationevent>
27 30
        </locationevent_id>
28
        <collectioncode_dwc>UNCCD</collectioncode_dwc>
29 31
        <taxondetermination>
30 32
            <isoriginal>true</isoriginal>
31 33
            <iscurrent>true</iscurrent>
......
42 44
            </plantconcept_id>
43 45
        </taxondetermination>
44 46
        <verbatimcollectorname>DAGGY, T.</verbatimcollectorname>
45
        <datasource_id><party><organizationname>UNCC</organizationname></party></datasource_id>
47
        <collectioncode_dwc>UNCCD</collectioncode_dwc>
46 48
        <sourceaccessioncode>34293</sourceaccessioncode>
47 49
    </specimenreplicate>
48 50
    <specimenreplicate id="1">
51
        <datasource_id><party><organizationname>UNCC</organizationname></party></datasource_id>
49 52
        <locationevent_id>
50 53
            <locationevent>
51 54
                <location_id>
52 55
                    <location>
56
                        <datasource_id><party><organizationname>UNCC</organizationname></party></datasource_id>
53 57
                        <locationdetermination>
54 58
                            <namedplace_id>
55 59
                                <namedplace>
......
64 68
                                </namedplace>
65 69
                            </namedplace_id>
66 70
                        </locationdetermination>
71
                        <sourceaccessioncode>34294</sourceaccessioncode>
67 72
                    </location>
68 73
                </location_id>
69 74
                <obsstartdate>1972-06-25</obsstartdate>
70 75
                <obsenddate/>
71 76
            </locationevent>
72 77
        </locationevent_id>
73
        <collectioncode_dwc>UNCCD</collectioncode_dwc>
74 78
        <taxondetermination>
75 79
            <isoriginal>true</isoriginal>
76 80
            <iscurrent>true</iscurrent>
......
87 91
            </plantconcept_id>
88 92
        </taxondetermination>
89 93
        <verbatimcollectorname>DAGGY, T.</verbatimcollectorname>
90
        <datasource_id><party><organizationname>UNCC</organizationname></party></datasource_id>
94
        <collectioncode_dwc>UNCCD</collectioncode_dwc>
91 95
        <sourceaccessioncode>34294</sourceaccessioncode>
92 96
    </specimenreplicate>
93 97
</VegBIEN>

Also available in: Unified diff