title: Cakephp 3: How to ignore beforefind for specific queries?
body: <p>I am working on multilingual posts. I have added beforefind() in the PostsTable so I can list posts for current language</p>
  
  <pre><code>public function beforeFind(Event $event, Query $query) {
  
      $query-&gt;where(['Posts.locale' =&gt; I18n::locale()]);
  }
  </code></pre>
  
  <p>In order to allow users duplicate posts in different languages i wrote following function:</p>
  
  <pre><code>public function duplicate(){
      $this-&gt;autoRender = false;
      $post_id= $this-&gt;request-&gt;data['post_id'];
  
      $post = $this-&gt;Posts
              -&gt;findById($post_id)
              -&gt;select(['website_id', 'category_id', 'locale', 'title', 'slug', 'body', 'image', 'thumb', 'meta_title', 'meta_description', 'other_meta_tags', 'status'])
              -&gt;first()
              -&gt;toArray();
  
      foreach($this-&gt;request-&gt;data['site'] as $site) {
          if($site['name'] == false) {
              continue;
          }
          $data = array_merge($post, [
              'website_id' =&gt; $site['website_id'],
              'locale' =&gt; $site['locale'],
              'status' =&gt; 'Draft',
              'duplicate' =&gt; true
          ]);
  
  
          $pageData = $this-&gt;Posts-&gt;newEntity($data);
  
          if($this-&gt;Posts-&gt;save($pageData)) {
              $this-&gt;Flash-&gt;success(__('Post have been created.'));;
          } else{
              $this-&gt;Flash-&gt;error(__('Post is not created.'));
          }
  
      }
  
      return $this-&gt;redirect(['action' =&gt; 'edit', $post_id]);
  }
  </code></pre>
  
  <p>In order to check if the posts are already duplicated. I am doing a check in 'edit' functino:</p>
  
  <pre><code>    $languages = TableRegistry::get('Websites')-&gt;find('languages');
  
      foreach($languages as $language)
      {
          $exists[] = $this-&gt;Posts
                      -&gt;findByTitleAndWebsiteId($post['title'], $language['website_id'])
                      -&gt;select(['locale', 'title', 'website_id'])
                      -&gt;first();
      }
      $this-&gt;set('exists',$exists); 
  </code></pre>
  
  <p>but as the beforefind() is appending query to above query. I am not getting any results. Is there any way I can ignore beforefind() for only cerrtain queries. I tried using entity as below:</p>
  
  <pre><code>public function beforeFind(Event $event, Query $query) {
  
      if(isset($entity-&gt;duplicate)) {
          return true;
      }
      $query-&gt;where(['Posts.locale' =&gt; I18n::locale()]);
  }
  </code></pre>
  
  <p>but no luck. Could anyone guide me? Thanks for reading. </p>