# Beforesave not being called

**URL:** <https://discourse.cakephp.org/t/beforesave-not-being-called/4478>\
**Category:** Need Help\
**Tags:** behavior\
**Created:** [June 26, 2018, 12:04pm UTC](https://discourse.cakephp.org/t/beforesave-not-being-called/4478 "2018-06-26T12:04:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhall](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jhall](https://discourse.cakephp.org/u/jhall)\
**Post date:** [June 26, 2018, 12:04pm UTC](https://discourse.cakephp.org/t/beforesave-not-being-called/4478/1 "2018-06-26T12:04:36Z")

</div>

I’ve added a new behavior and added the code below just to test to see if my override is working however this never gets called within my behavior. Is there something else I need to do to make it work?

public function beforeSave(Event $event, EntityInterface $entity, ArrayObject $options)  
{  
echo ‘blah’;  
die;  
}

---

<div class="post-metadata">

**Author:** ![jhall](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jhall](https://discourse.cakephp.org/u/jhall)\
**Post date:** [June 26, 2018, 2:42pm UTC](https://discourse.cakephp.org/t/beforesave-not-being-called/4478/3 "2018-06-26T14:42:03Z")

</div>

I solved this and it was pretty simple. In my attempt to be very organized I had the table class defined in a sub folder like Table\Client\Table.php instead of Table\Table.php and the location of the files seem to be pretty important.
