title: sqlachemy hybrid property error - operator is not supported on this expression
body: <p>Following example from the <a href="http://docs.sqlalchemy.org/en/latest/orm/mapped_attributes.html" rel="nofollow">docs</a>, but cannot understand why it's not working</p>
  
  <pre><code>class CCStandard(Base):
      """Codes, grade, code description, and name"""
      __tablename__ = "DimCCStandard"
  
  CCStandardKey = deferred(Column('CCStandardKey', Integer, primary_key=True))
  CCStdCode = Column('CCStdCode', String)
  
  #ccstd_info group
  CCStdDesc = deferred(Column('CCStdDesc', String), group='ccstd_info')
  CCStdName = deferred(Column('CCStdName', String), group='ccstd_info')
  CCStdCluster = deferred(Column('CCStdCluster', String), group='ccstd_info')
  
  @hybrid_property
  def Cluster(self):
      return self.CCStdCode[:1]
  </code></pre>
  
  <p>simple query below return <code>"Operator 'getitem' is not supported on this expression"</code></p>
  
  <pre><code>a=session.query(CCStandard.Cluster)
  </code></pre>
  
  <p>I'm sure this column is a string, so not sure why I'm getting this. If I try a using a + operator it does work, ie:</p>
  
  <pre><code>@hybrid_property
  def Cluster(self):
      return self.CCStdCode + 'well this works'
  </code></pre>
  
  <p>Underlying database is a SQLServer. This column in question is an nvarchar.</p>