Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • develop
  • fSearch
  • fuzzySearch
  • fuzzySearchChanges
  • hotFixInFuzzySearch
  • hotFixSeedFunction
  • master
7 results

Target

Select target project
  • roshan.suvarnkar/hdfc-common-utility
1 result
Select Git revision
  • develop
  • fSearch
  • fuzzySearch
  • fuzzySearchChanges
  • hotFixInFuzzySearch
  • hotFixSeedFunction
  • master
7 results
Show changes

Commits on Source 2

......@@ -116,6 +116,7 @@ export const seedWithRelation = async <
export type ForeignKeyConfig<ChildType> = {
parentModel: keyof PrismaClient;
parentLookupKey: string;
parentPrimaryKey?: string;
childReferenceKey: keyof ChildType;
childForeignKeyField: keyof ChildType;
};
......@@ -141,7 +142,8 @@ export const seedWithMultipleParents = async <
const map = new Map<any, any>();
for (const parent of parents) {
map.set(parent[fk.parentLookupKey], parent.id);
const id = fk.parentPrimaryKey ?? "id";
map.set(parent[fk.parentLookupKey], parent[id]);
}
lookupMaps[String(fk.parentModel)] = map;
......