0
我有3種型號:MODELA,ModelB和ModelC。如何刪除通過關係創建的相關項目?
模型 「A」 具有通模式 「C」 的關係(HasManyThrough)與模型 「B」。
如何刪除相關的項目?
module.exports = function(ModelA) {
ModelA.beforeRemote('deleteById', function(context, remoteMethodOutput, next) {
//Remove relationships
next();
});
};
你想先刪除相關的項目?這是你的問題嗎? –
@VishalKumar是的。 – Filipe