I have two entities Order
and Address
and they have @ManyToMany
relationship .
Address entity :
@ManyToMany(() => Order, (order) => order.address, { cascade: true })
@JoinTable()
order: Order;
Order entity :
@ManyToMany(() => Address, (address) => address.order, { cascade: true })
address: Address;
I need to know which entitiy need the cascade option and how can I identify that ?
Should I just use the cascade option in both entities ?