```dart Future updatePost() async { final postsWithId = await Amplify.DataStore.query( Post.classType, where: Post.ID.eq('123'), ); final oldPost = postsWithId.first; final newPost = oldPost.copyWith(id: oldPost.id, title: 'Updated Title'); await Amplify.DataStore.save(newPost); } ```