Skip to content

Commit

Permalink
#534 fixed OccurrenceMappingMapper.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
marcos-lg committed Dec 6, 2023
1 parent 6d1b1c9 commit 011d9a8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,11 @@ public void explicitMappingsWithParentCodeTest() {
occMappingC1.setParentCode(i1.getCode());
collectionService.addOccurrenceMapping(c1.getKey(), occMappingC1);

OccurrenceMapping occMappingC2 = new OccurrenceMapping();
occMappingC2.setDatasetKey(d1.getKey());
occMappingC2.setParentCode(i2.getCode());
collectionService.addOccurrenceMapping(c2.getKey(), occMappingC2);

LookupParams params = new LookupParams();
params.setDatasetKey(d1.getKey());
params.setInstitutionCode(i1.getCode());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
<mapper namespace="org.gbif.registry.persistence.mapper.collections.OccurrenceMappingMapper">

<sql id="OCCURRENCE_MAPPING_FIELDS">
key, code, identifier, dataset_key, created_by, created
key, code, parent_code, identifier, dataset_key, created_by, created
</sql>

<insert id="createOccurrenceMapping" useGeneratedKeys="true" keyProperty="key">
INSERT INTO occurrence_mapping(code, identifier, dataset_key, created_by, created)
INSERT INTO occurrence_mapping(code, parent_code, identifier, dataset_key, created_by, created)
VALUES(
#{code,jdbcType=VARCHAR},
#{parentCode,jdbcType=VARCHAR},
#{identifier,jdbcType=VARCHAR},
#{datasetKey,jdbcType=OTHER},
#{createdBy,jdbcType=VARCHAR},
Expand Down

0 comments on commit 011d9a8

Please sign in to comment.