You can INCLUDE =CONSTRAINT option while exporting to include constraints and TABLE_EXISTS_ACTION=REPLACE while importing ,if the table already exists then it replaces the table with the exported table along with the constraints
expdp username/password@dbnameA TABLES=emp,dept DIRECTORY=DMPDIR DUMPFILE=expdp_1.dmp LOGFILE=expdp_1.log INCLUDE=constraint
impdp username/password@dbnameB DIRECTORY=DMPDIR DUMPFILE=expdp_1.dmp LOGFILE=impdp_1.log TABLE_EXISTS_ACTION=REPLACE
Since you having PRIMARY key in the parent and chile table, it checks for unique values when you are importing data from one database to another database. If there exists any duplicate values, then it will "ORA-00001: unique constraint" erorr.
To Avoid this behaviour:
1)Disable the constraint on the target tables before import and then enable the constraint with novalidate option after import
2)Truncate or delete the table by using TABLE_EXISTS_ACTION option during import
CONSTRAINTS import constraints (Y)
Specifies data to load.
Valid keywords are: [ALL], DATA_ONLY and METADATA_ONLY.
Data layer option flags.
Valid keywords are: SKIP_CONSTRAINT_ERRORS.
Action to take if imported object already exists.
Valid keywords are: APPEND, REPLACE, [SKIP] and TRUNCATE.
Predicate clause used to import a subset of a table.
For example, QUERY=employees:"WHERE department_id > 10".
check more options on help main page ...
If the merge works for the parent - why is it an issue for the child?
Also - you can maybe use DBMS_COMPARISON for this
But i think realistically you are going to have do some manual coding to do exactly what you want. A lot depends on how you are generating id's and if you are just able to use pk/fk values from the original data source.