title: SQLAlchemy cannot find a class name
body: <p>Simplified, I have the following class structure (in a single file):</p>
  
  <pre><code>Base = declarative_base()
  
  class Item(Base):
      __tablename__ = 'item'
      id = Column(BigInteger, primary_key=True)
      # ... skip other attrs ...
  
   class Auction(Base):
       __tablename__ = 'auction'
       id = Column(BigInteger, primary_key=True)
       # ... skipped ...
       item_id = Column('item', BigInteger, ForeignKey('item.id'))
  
       item = relationship('Item', backref='auctions')
  </code></pre>
  
  <p>I get the following error from this:</p>
  
  <pre><code>sqlalchemy.exc.InvalidRequestError
  InvalidRequestError: When initializing mapper Mapper|Auction|auction, expression
      'Item' failed to locate a name ("name 'Item' is not defined"). If this is a
      class name, consider adding this relationship() to the Auction class after
      both dependent classes have been defined.
  </code></pre>
  
  <p>I'm not sure how Python cannot find the Item class, as even when passing the class, rather than the name as a string, I get the same error. I've been struggling to find examples of how to do simple relationships with SQLAlchemy so if there's something fairly obvious wrong here I apologise.</p>