Reputation: 12112
The save()
method is used only to add an entry to the db, not when it is modified. Eg., when I create a question, I do question.save
. When I add an answer to the question, I just do question.add(answer)
. I don't have to save()
the question to save the changes. Is my understanding correct?
Upvotes: 1
Views: 2687
Reputation: 54914
Play uses save()
regardless of whether it is new or existing model. It manages all the complexity of this for you behind the scenes.
Upvotes: 2