What is the difference between save and saveAll function in cakephp?

前端 未结 3 1671
慢半拍i
慢半拍i 2021-01-21 21:41

can any one give example please

3条回答
  •  南笙
    南笙 (楼主)
    2021-01-21 22:16

    As of Cake 2.0

    save Saves model data (based on white-list, if supplied) to the database. By default, validation occurs before save.

    saveAll Saves multiple individual records for a single model; Also works with a single record, as well as all its associated records.

提交回复
热议问题