-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
STI delete_all works fine on 2 layers STI
class P include Mongoid::Document end class C < P end
> P.delete_all # MOPED: 127.0.0.1:27017 DELETE database=xxx_development collection=ps selector={} flags=[]
but some problem occurred on 3 layers STI
class GF include Mongoid::Document end class P < GF end class C < P end
> P.delete_all # MOPED: 127.0.0.1:27017 DELETE database=xxx_development collection=gfs selector={:_type=>"P"} flags=[]
Invoking P.delete_all only delete all documents of type P but I would like to delete all documents of type P and C
Is this issue by design or bug ?