回答編集履歴
2
具体例を追記
test
CHANGED
@@ -3,3 +3,25 @@
|
|
3
3
|
|
4
4
|
|
5
5
|
belongsToMany アソシエーションの[『through』オプションの使用](https://book.cakephp.org/3.0/ja/orm/associations.html#through)
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
具体的には、以下のような感じのテーブルに対応する LanguagesUsers モデルを作ればできそうです。
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
テーブル languages_users
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
|Name|Type|
|
18
|
+
|
19
|
+
|:--|:--|
|
20
|
+
|
21
|
+
|id|int|
|
22
|
+
|
23
|
+
|user_id|int|
|
24
|
+
|
25
|
+
|language_id|int|
|
26
|
+
|
27
|
+
|main|bool|
|
1
リンクを修正
test
CHANGED
@@ -2,4 +2,4 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
-
|
5
|
+
belongsToMany アソシエーションの[『through』オプションの使用](https://book.cakephp.org/3.0/ja/orm/associations.html#through)
|