Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieve the softDelete entity after remove #3281

Open
hooooooouzx opened this issue Dec 19, 2024 · 0 comments
Open

Retrieve the softDelete entity after remove #3281

hooooooouzx opened this issue Dec 19, 2024 · 0 comments
Labels
type: bug 🐛 Something isn't working

Comments

@hooooooouzx
Copy link

hooooooouzx commented Dec 19, 2024

Describe the bug
I use removeOptionGroupFromProduct to remove an optionGroup from a product,all the productVariants have been softDelete.
But after this remove,I can still use Product or ProductOptionGroup get the optionGroup which had been deleted .I checked the database and the column deletedAt has value,I was so weird why I could get an entity which had been softDeleted.

To Reproduce
Steps to reproduce the behavior:

  1. Create a Product
  2. Create some optionGroups
  3. Create some options in every optionGroup
  4. Create some ProductVariants
  5. Call deleteProductVariant GraphQL to softDelete all ProductVariants
  6. Call deleteProductOption GraphQL to delete all options
  7. Call removeOptionGroupFromProduct GraphQL to remove all optionGroups from this product
  8. Call Product GraphQL with producId to retrieve the product details,I can still get the removed optionGroups
  9. Call ProductOptionGroup GraphQL with productOptionGroupId to retrieve the option group,I can still get the removed optionGroups

Expected behavior
After removeOptionGroupFromProduct,the ProductOptionGroup shouldn't be retrieved.

Environment (please complete the following information):

  • @vendure/core version: V3.1.0
  • Nodejs version: V22.10.0
  • Database (mysql/postgres etc): postgres

Additional context
Use Admin UI to create product details.Use PostMan to test GraphQL.

Thanks~

@hooooooouzx hooooooouzx added the type: bug 🐛 Something isn't working label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant