Add the model above to the `schema.graphql` file located by default at `amplify/backend/{api_name}/` and regenerate the models again with the following command:

```console
amplify codegen models
```

Once it is regenerated, save your posts with many-to-many mode like the following:

```dart
Future<void> savePostAndEditor() async {
  final post = Post(title: 'My First Post');
  final editor = User(username: 'Nadia');
  final postEditor = PostEditor(post: post, user: editor);

  // first you save the post
  await Amplify.DataStore.save(post);

  // secondly, you save the editor/user
  await Amplify.DataStore.save(editor);

  // then you save the model that links a post with an editor
  await Amplify.DataStore.save(postEditor);
  print('Saved user, post and postEditor!');
}
```
