#What is cascade option ??

4 messages · Page 1 of 1 (latest)

radiant pivot
#

For example in this code

// THIS SNIPPET IS PICKED FROM ENTITY CLASS WHICH IS CALLED ORDER
  @OneToMany(() => NeedEntity, need => need.order, { cascade: true })
  @JoinColumn()
  needs: NeedEntity[];

i read about it online, it says " cascade allows for updation and deletion of record " can i get more elaborated explanation as to why is it necessary and its also on one side of relation (on the OneToMany side ) not on the other end (ManyToOne side)

minor sand
# radiant pivot For example in this code ``` // THIS SNIPPET IS PICKED FROM ENTITY CLASS WHICH...

Hello, I have the same problem, i don't understand why its only on one side.

But read this:

And in this video it is explained :

In any reasonably realistic data model, there are bound to be multiple entities needed to completely describe your business domain. And when there are multiple entities involved, they would be related to each other in some way. Hence, we need a way to describe relationships between entities.

Databases have their own way of establishing relatio...

▶ Play video
radiant pivot