Skip to content

Commit d4e18a9

Browse files
committed
chore(datastore): update m-to-m integration tests models
1 parent de5db39 commit d4e18a9

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

packages/amplify_datastore/example/lib/models/CpkPostTags.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ class CpkPostTags extends Model {
191191

192192
modelSchemaDefinition.indexes = [
193193
ModelIndex(
194-
fields: const ["cpkManyToManyPostID"], name: "byCpkManyToManyPost"),
194+
fields: const ["cpkManyToManyPostId"], name: "byCpkManyToManyPost"),
195195
ModelIndex(
196-
fields: const ["cpkManyToManyTagID", "cpkManyToManyTaglabel"],
196+
fields: const ["cpkManyToManyTagId", "cpkManyToManyTaglabel"],
197197
name: "byCpkManyToManyTag")
198198
];
199199

@@ -202,13 +202,13 @@ class CpkPostTags extends Model {
202202
modelSchemaDefinition.addField(ModelFieldDefinition.belongsTo(
203203
key: CpkPostTags.CPKMANYTOMANYPOST,
204204
isRequired: true,
205-
targetNames: ["cpkManyToManyPostID"],
205+
targetNames: ["cpkManyToManyPostId"],
206206
ofModelName: (CpkManyToManyPost).toString()));
207207

208208
modelSchemaDefinition.addField(ModelFieldDefinition.belongsTo(
209209
key: CpkPostTags.CPKMANYTOMANYTAG,
210210
isRequired: true,
211-
targetNames: ["cpkManyToManyTagID", "cpkManyToManyTaglabel"],
211+
targetNames: ["cpkManyToManyTagId", "cpkManyToManyTaglabel"],
212212
ofModelName: (CpkManyToManyTag).toString()));
213213

214214
modelSchemaDefinition.addField(ModelFieldDefinition.nonQueryField(

packages/amplify_datastore/example/lib/models/PostTags.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,22 +172,22 @@ class PostTags extends Model {
172172
modelSchemaDefinition.pluralName = "PostTags";
173173

174174
modelSchemaDefinition.indexes = [
175-
ModelIndex(fields: const ["postID"], name: "byPost"),
176-
ModelIndex(fields: const ["tagID"], name: "byTag")
175+
ModelIndex(fields: const ["postId"], name: "byPost"),
176+
ModelIndex(fields: const ["tagId"], name: "byTag")
177177
];
178178

179179
modelSchemaDefinition.addField(ModelFieldDefinition.id());
180180

181181
modelSchemaDefinition.addField(ModelFieldDefinition.belongsTo(
182182
key: PostTags.POST,
183183
isRequired: true,
184-
targetNames: ["postID"],
184+
targetNames: ["postId"],
185185
ofModelName: (Post).toString()));
186186

187187
modelSchemaDefinition.addField(ModelFieldDefinition.belongsTo(
188188
key: PostTags.TAG,
189189
isRequired: true,
190-
targetNames: ["tagID"],
190+
targetNames: ["tagId"],
191191
ofModelName: (Tag).toString()));
192192

193193
modelSchemaDefinition.addField(ModelFieldDefinition.nonQueryField(

0 commit comments

Comments
 (0)