title: How to extend peewee to use logical deletes?
body: <p>I'm using peewee as ORM for a project and want to extend it to handle logical deletes.</p>
  
  <p>I've added "deleted" field to my base model and have extended the delete operations as follows:</p>
  
  <pre><code>@classmethod
  def delete(cls, permanently=False):
      if permanently:
          return super(BaseModel, cls).delete()
      else:
          return super(BaseModel, cls).update(deleted=True, modified_at=datetime.datetime.now())
  
  def delete_instance(self, permanently=False, recursive=False, delete_nullable=False):
      if permanently:
          return self.delete(permanently).where(self.pk_expr()).execute()
      else:
          self.deleted = True
          return self.save()
  </code></pre>
  
  <p>This works great. However, when I'm overriding select I get some problems.</p>
  
  <pre><code>@classmethod
  def select(cls, *selection):
      print selection
      return super(BaseModel, cls).select(cls, *selection).where(cls.deleted == False)
  </code></pre>
  
  <p>This works in most cases, but in certains selects it breaks when the resulting query ends up  using a join with the keyword "IN" with the following error: "1241, 'Operand should contain 1 column(s)"</p>
  
  <p>Any suggestion on how to properly override select or work around this problem?</p>