Skip to content

Instantly share code, notes, and snippets.

@B4nan
Created February 6, 2022 11:58
Show Gist options
  • Save B4nan/fc8c0b1c0a7d00534f30578f4fd709e2 to your computer and use it in GitHub Desktop.
Save B4nan/fc8c0b1c0a7d00534f30578f4fd709e2 to your computer and use it in GitHub Desktop.
const book = await em.findOneOrFail(Book, 1, { populate: ['author'] });
// update existing book's author's name
wrap(book).assign({
author: {
id: book.author.id,
name: 'New name...',
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment