как сделать связь в сущностях через промежуточную таблицу? Допустим есть сущность User и сущность Project. Хочу что бы пользователь мог пинадлежать многим проектам, и связь была через таблицу user_project(user_id, project_Id)
/** * By default transactions are enabled and all queries in persistence operation are wrapped into the transaction. * You can disable this behaviour by setting { transaction: false } in the persistence options. */ transaction?: boolean;
https://typeorm.io/#/repository-api save - Saves a given entity or array of entities. If the entity already exist in the database, it is updated. If the entity does not exist in the database, it is inserted. It saves all given entities in a single transaction (in the case of entity, manager is not transactional). Also supports partial updating since all undefined properties are skipped. Returns the saved entity/entities.