Why does TypeORM require the inverse side of OneToMany to be provided, but doesn't require the inverse side of ManyToOne to be provided?
问题 The following quote is taken from the TypeORM docs: @OneToMany cannot exist without @ManyToOne. If you want to use @OneToMany, @ManyToOne is required. However, the inverse is not required: If you only care about the @ManyToOne relationship, you can define it without having @OneToMany on the related entity. Where you set @ManyToOne - its related entity will have "relation id" and foreign key. Why do you need to provide the inverse side of OneToMany but not ManyToOne? 回答1: It is because