With the new TypeORM-Release 0.2.30 a very important feature has been added — the option to delete orphaned rows on a one-to-many relationship. Instead of only deleting relationships between entities now you have the possibility to let automatically remove the child entities as well. With a very simple example we want to show you how.
In our example we have two entities:
A location can have multiple rooms. A room can only have one location.
Here we can see the LocationEntity. It has the generated id…