Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
5126 Zobrazení

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.

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
bře 20
4918
1
led 19
3597
4
čvn 17
19933
2
led 23
20974
1
led 20
7098