“Sequellize Find Deleted” Kode Jawaban

Sequellize Find Deleted

User.find({
  where: {email: req.body.user.email}, 
  paranoid: false
})
Curious Cardinal

Force Delete dan Restore in Sequellize

// Example showing the instance `restore` method
// We create a post, soft-delete it and then restore it back
const post = await Post.create({ title: 'test' });
console.log(post instanceof Post); // true
await post.destroy();
console.log('soft-deleted!');
await post.restore();
console.log('restored!');

// Example showing the static `restore` method.
// Restoring every soft-deleted post with more than 100 likes
await Post.restore({
  where: {
    likes: {
      [Op.gt]: 100
    }
  }
});
Anies

Jawaban yang mirip dengan “Sequellize Find Deleted”

Pertanyaan yang mirip dengan “Sequellize Find Deleted”

Lebih banyak jawaban terkait untuk “Sequellize Find Deleted” di JavaScript

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya