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
My Gemfile file use
gem 'paranoia', :github => 'radar/paranoia', :branch => 'rails4'
User model
has_one :organization, dependent: :destroy
has_many :activities, dependent: :destroy
Organization model
belongs_to :user
Activity model
belongs_to :user
The user has_one organization , and user has_many activities.
Once I restore the user record, execute "User.restore(10, :recursive => true)", all activities are ok, but the organization still missing.
Look at the picture, the query :
SELECT organizations.* FROM organizations WHERE organizations.deleted_at IS NULL AND organizations.user_id = 10 ORDER BY organizations.id ASC LIMIT 1
Why it found the record : 'deleted_at' IS NULL
The correct should be "'deleted_at' IS NOT NULL " ,right?
So, is it a bug?
The text was updated successfully, but these errors were encountered:
@kai209209 I don't think that it'll fix this particular issue, but you should really upgrade to 4.0.3, since that's the latest release and contains security problems.
My Gemfile file use
gem 'paranoia', :github => 'radar/paranoia', :branch => 'rails4'
User model
has_one :organization, dependent: :destroy
has_many :activities, dependent: :destroy
Organization model
belongs_to :user
Activity model
belongs_to :user
The user has_one organization , and user has_many activities.
Once I restore the user record, execute "User.restore(10, :recursive => true)", all activities are ok, but the organization still missing.
Look at the picture, the query :
SELECT
organizations
.* FROMorganizations
WHEREorganizations
.deleted_at
IS NULL ANDorganizations
.user_id
= 10 ORDER BYorganizations
.id
ASC LIMIT 1Why it found the record : 'deleted_at' IS NULL
The correct should be "'deleted_at' IS NOT NULL " ,right?
So, is it a bug?
The text was updated successfully, but these errors were encountered: