# How to save data in new table using beforeSave()?

**URL:** <https://discourse.cakephp.org/t/how-to-save-data-in-new-table-using-beforesave/1619>\
**Category:** Need Help\
**Created:** [November 28, 2016, 7:59am UTC](https://discourse.cakephp.org/t/how-to-save-data-in-new-table-using-beforesave/1619 "2016-11-28T07:59:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SATHISH](https://avatars.discourse-cdn.com/v4/letter/s/858c86/32.png) [@SATHISH](https://discourse.cakephp.org/u/SATHISH)\
**Post date:** [November 28, 2016, 7:59am UTC](https://discourse.cakephp.org/t/how-to-save-data-in-new-table-using-beforesave/1619/1 "2016-11-28T07:59:12Z")

</div>

Hi,  
How to load model and save new data in new table in beforesave() function?

---

<div class="post-metadata">

**Author:** ![rrd](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/rrd/32/113_2.png) [@rrd](https://discourse.cakephp.org/u/rrd)\
**Post date:** [November 28, 2016, 3:31pm UTC](https://discourse.cakephp.org/t/how-to-save-data-in-new-table-using-beforesave/1619/2 "2016-11-28T15:31:41Z")

</div>

If the models are associated you can save multiple models by save. If they are not there is a good chance that you need to raise and handle an Event.

[http://book.cakephp.org/3.0/en/core-libraries/events.html](http://book.cakephp.org/3.0/en/core-libraries/events.html)
