You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my application, I encountered unintentionally behavior.
With this simple example
class ParentModel < ApplicationRecord
acts_as_paranoid
has_one :child_model, dependent: :destroy
end
class ChildModel < ApplicationRecord
acts_as_paranoid
belongs_to :parent_model
end
There are related one ParentModel and two ChildModels records.
They are all deleted.
One ChildModel is deleted 20minutes ago.
One ParentModel and the other ChildModel is deleted 5minutes ago
And then call #restore with recursive and recovery_window.
ParentModel is restored intentionally.
But no ChildModel is restored.
The text was updated successfully, but these errors were encountered:
kinkinkon1009
changed the title
Sometimes wouldn't restoring recursively with recovery_window has_one model
Sometimes wouldn't restoring with recursive and recovery_window has_one model
Jul 25, 2020
Hi.
In my application, I encountered unintentionally behavior.
With this simple example
There are related one ParentModel and two ChildModels records.
They are all deleted.
One ChildModel is deleted 20minutes ago.
One ParentModel and the other ChildModel is deleted 5minutes ago
And then call #restore with recursive and recovery_window.
ParentModel is restored intentionally.
But no ChildModel is restored.
The text was updated successfully, but these errors were encountered: