Skip to content

Commit a6efa72

Browse files
author
Dane Pilcher
authored
feat: set correct association with references (#793)
1 parent 453baf7 commit a6efa72

13 files changed

+1247
-48
lines changed

packages/appsync-modelgen-plugin/src/__tests__/utils/process-connections-v2.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,7 @@ describe('Connection process with custom Primary Key support tests', () => {
710710
targetNames: ['teamProjectProjectId', 'teamProjectName'],
711711
connectedModel: project,
712712
isConnectingFieldAutoCreated: false,
713+
isUsingReferences: false,
713714
});
714715
});
715716
});
@@ -787,6 +788,7 @@ describe('Connection process with custom Primary Key support tests', () => {
787788
targetNames: ["postCommentsPostId", "postCommentsTitle"],
788789
connectedModel: post,
789790
isConnectingFieldAutoCreated: false,
791+
isUsingReferences: false,
790792
});
791793
});
792794
it('should return correct connection info in hasMany/belongsTo bi direction when in JS platforms', () => {
@@ -837,6 +839,7 @@ describe('Connection process with custom Primary Key support tests', () => {
837839
targetNames: ["postCommentsPostId", "postCommentsTitle"],
838840
connectedModel: post,
839841
isConnectingFieldAutoCreated: false,
842+
isUsingReferences: false,
840843
});
841844
});
842845
it('should return correct connection info in hasMany/belongsTo bi direction when index is defined', () => {
@@ -874,6 +877,7 @@ describe('Connection process with custom Primary Key support tests', () => {
874877
targetNames: ["postId", "postTitle"],
875878
connectedModel: post,
876879
isConnectingFieldAutoCreated: false,
880+
isUsingReferences: false,
877881
});
878882
});
879883
it('should return correct connection info in hasMany uni direction when index is defined', () => {
@@ -954,6 +958,7 @@ describe('Connection process with custom Primary Key support tests', () => {
954958
targetNames: ['teamProjectProjectId', 'teamProjectName'],
955959
connectedModel: project,
956960
isConnectingFieldAutoCreated: false,
961+
isUsingReferences: false,
957962
});
958963
});
959964

@@ -993,6 +998,7 @@ describe('Connection process with custom Primary Key support tests', () => {
993998
targetNames: ['compositeDogCompositeOwnerLastName', 'compositeDogCompositeOwnerFirstName'],
994999
connectedModel: compositeOwner,
9951000
isConnectingFieldAutoCreated: false,
1001+
isUsingReferences: false,
9961002
});
9971003
});
9981004

@@ -1032,6 +1038,7 @@ describe('Connection process with custom Primary Key support tests', () => {
10321038
targetNames: ['boringDogBoringOwnerId'],
10331039
connectedModel: boringOwner,
10341040
isConnectingFieldAutoCreated: false,
1041+
isUsingReferences: false,
10351042
});
10361043
});
10371044
})

0 commit comments

Comments
 (0)