コンテンツへスキップ
メニュー
この質問にフラグが付けられました

When clicking the Save button on a form, I understood the Create method is executed. So all models on the form are automatically linked together (according to foreign keys) and saved in the database ?

I'm trying, by overriding Create method, to modify some behaviours and I need to get new records from the form inside the method. However, I suppose there is no ID until the end of the transaction which appends at the end of the method.

Maybe I'm totally wrong, all this is new for me.


EDIT: Looks like the "vals" parameter of Create method contains the values of all fields, so if I change values of vals, records will be saved with my new values I suppose.

アバター
破棄
関連投稿 返信 ビュー 活動
2
3月 20
4749
1
1月 19
3482
4
6月 17
19765
2
1月 23
20747
1
1月 20
6968