we have rails application we have added dependent:destroy
to delete the dependent record. Some one suggests that if you will use cascade in database it will work more efficiently rather then dependent: :destroy
. Can anyone suggest what will be the best way.
I have look in couple of link Option for Cascade Delete for References or On Delete Creating foreign key constraints in ActiveRecord
But did not get we can do cascade in existing database?
Aucun commentaire:
Enregistrer un commentaire