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

issues with soft deletes #50

Closed
jayseo5953 opened this issue Apr 18, 2024 · 1 comment
Closed

issues with soft deletes #50

jayseo5953 opened this issue Apr 18, 2024 · 1 comment

Comments

@jayseo5953
Copy link

Hello all, so my project uses soft delete.

I have an order model that has many order_items.
I create a snapshot of order.
Then I destroy an order item and add a new order_item.

Next time I run snapshot_restore!, i get DB error saying the id of the order_item is duplicated since they are still in the database.
Wonder if anyone solved this issue..
The error happens here

@westonganger
Copy link
Owner

westonganger commented Aug 21, 2024

At a glance it appears to be in correlation with a DB uniqueness index in your application. But its a little hard to say for sure.

@jayseo5953 I would be happy to work with you on a fix. Can you try writing a failing test/spec in a PR then we can work together to come up with a good solution.

Sorry for not responding to the original ask in a reasonable timeframe, thats not very like me. I promise I will make myself available to support you further, just so you know your time isnt being wasted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants