Angularで作るER DIAGRAM TOOL – 第十三回 many-to-manyのリレーション作成の実装

(1) Many-to-many relationship creation function

/src/app/service/data.service.ts
https://github.com/dog-ears/er-diagram-tool/commit/b9911a0a182ff33d0dc910910baad7dc71c11cea#diff-ae990bb302f27e60323deb45d6746b17

· Implement the contents of addManyToManyRelation ()

· The name of a new pivot model is
source_model.name + target_model.name
Alternatively,
It becomes target_model.name + source_model.name.
※ Which comes first will be decided in ascending order.

Also, the pivot model,
It has two schema named [source_model.name] _id and [target_model.name] _id.

cap13_1

This completes the implementation of the many-to-many relationship.
Next time we will implement Export JSON.

シェアする

  • このエントリーをはてなブックマークに追加

フォローする