-
Type:
Sub-task
-
Resolution: Done
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
App Modernization
-
Fully Compatible
-
None
-
None
-
None
-
None
-
None
-
None
-
None
ISSUE DESCRIPTION AND IMPACT
Fields can be omitted or mis-named if a field's target name matches the source name (column name) of a different, subsequent field in the same mapping.
As an example, consider a database where the source table has columns such as the below:
- A “notes” column containing a string.
- A “pubdate” column containing a date of publication.
In the mapping editor the user can choose the target field names of these columns.
Column names are guaranteed to be unique, and target names must be unique, but in this example:
- The “notes” column is given target name “pubdate”
- The “pubdate” column is given target name “pubdate1”
After migration, the target documents will look like the below:
{
_id: ObjectId('...'),
pubDate1: "An overview of available database systems with emphasis on common busin..."
<other_columns>
}
The string contents of the “notes” column was used to populate the “pubdate1” field in MongoDB instead of the intended “pubdate” field.
The date contents of the “pubdate” column was overwritten and omitted from the document entirely.
DIAGNOSIS AND AFFECTED VERSIONS
- Running verification after the migration would have only detected issues if any of the affected fields is a primary key field since verification only checks the primary key fields. Please note that verification is currently only possible after a migration.
- If any field has a target name which matches the source name (column name) of any subsequent field in the order of fields in the UI, then you would have been affected by this bug.
REMEDIATION AND WORKAROUNDS
Workarounds include editing mappings to choose unique target names or using an aggregation pipeline after migration to rename affected fields. Alternatively, users may upgrade to v1.16 and re-migrate the affected collections.
Please feel free to open a MongoDB support ticket for direct assistance.
- is related to
-
SERVER-126523 Migrations to sharded migrations have been disabled in Relational Migrator
-
- Closed
-
-
SERVER-126528 Cyclic mappings with an excluded foreign key under an embedded array will be missing
-
- Closed
-
- related to
-
SERVER-126529 Source table column used in multiple composite foreign key relationships can cause mismatched embeddings
-
- Closed
-
-
SERVER-126522 Relational Migrator Data Integrity Issues
-
- Closed
-