public function onBeforeDelete()
    {
        parent::onBeforeDelete();
        
        // Delete all locations attached to this order
        foreach ($this->Locations() as $item) {
            $item->delete();
        }

        // Delete all notes attached to this order
        foreach ($this->Notes() as $item) {
            $item->delete();
        }
    }