@@ -1136,7 +1136,7 @@ public final void setParentTables(Vector<Vector<Uploader.ParentTableEntry>> pare
11361136 {
11371137 pte .getImportTable ().addChild (this );
11381138 }
1139- else if (needToMatchChildren () && pte .getImportTable ().isOneToOneChild ())
1139+ else if (needToMatchChildren (true ) && pte .getImportTable ().isOneToOneChild ())
11401140 {
11411141 addChild (pte .getImportTable ());
11421142 }
@@ -2645,7 +2645,7 @@ else if (child.getTblClass().equals(CollectingEventAuthorization.class))
26452645 }
26462646 }
26472647 }
2648- if (tblClass .equals (CollectingTrip .class )) {
2648+ else if (tblClass .equals (CollectingTrip .class )) {
26492649 for (UploadTable child : specialChildren ) {
26502650 logDebug (child .getTable ().getName ());
26512651 if (child .getTblClass ().equals (CollectingTripAttribute .class ))
@@ -3069,20 +3069,24 @@ else if (tblClass.equals(Locality.class)) {
30693069 return result ;
30703070 }
30713071
3072+ protected boolean needToMatchChildren () {
3073+ return needToMatchChildren (false );
3074+ }
30723075 /**
30733076 *
30743077 * @return
30753078 */
3076- protected boolean needToMatchChildren ()
3079+ protected boolean needToMatchChildren (boolean buildingUploader )
30773080 {
3078- if (updateMatches ) {
3081+ if (! buildingUploader && uploader . isUpdateUpload () ) {
30793082 return !matchUsingExportedRecord ();
30803083 }
30813084
30823085 // temporary fix. Really should determine based on cascade rules and the fields in the
30833086 // dataset.
3084- return !skipChildrenMatching .get () &&
3085- (tblClass .equals (CollectingEvent .class )
3087+ return (buildingUploader || !skipChildrenMatching .get ()) &&
3088+ (tblClass .equals (CollectingEvent .class )
3089+ || tblClass .equals (CollectingTrip .class )
30863090 || tblClass .equals (Accession .class )
30873091 || tblClass .equals (Agent .class )
30883092 || tblClass .equals (CollectionObject .class )
0 commit comments