public function beforeSave(Event $event, Aco $aco)
    {
        if ($aco->isNew()) {
            $aco->set('alias_hash', md5($aco->alias));
        }
    }
public function beforeSave(Event $event, Aco $aco)
    {
        if ($aco->isNew()) {
            $aco->set('alias_hash', md5($aco->alias));
        }
    }
public function beforeSave ( Event $ event , Aco $ aco ) { if ( $ aco -> isNew ( ) ) { $ aco -> set ( 'alias_hash' , md5 ( $ aco -> alias ) ) ; } }
We create a hash of "alias" property so we can perform
case sensitive SQL comparisons.

@param \Cake\Event\Event $event The event that was triggered
@param \User\Model\Entity\Aco $aco ACO entity being saved
@return void
We create a hash of alias property so we can perform case sensitive SQL comparisons .