I am staring with lp4, i I have following two models
Product
ProductTranslations
the Product hasMany relation with the ProductTranslations model How can i delete product, ProductTranslations will be deleted corresponding to product
I am staring with lp4, i I have following two models
Product
ProductTranslations
the Product hasMany relation with the ProductTranslations model How can i delete product, ProductTranslations will be deleted corresponding to product
What you're looking for is cascade delete. LoopBack 4 does not support this out-of-the-box (see issue #3526).
As a workaround, you may override the
.delete()
Repository function to start a Transaction and emulate a cascade delete with full ACID compliance.