I'm using sqlalchemy 0.6.6 and sqlite 3.6.22 on Python 2.6.  When I do:

    In [1]: for i in ses.query(UserSnapshot):
       ...:     print i
       ...:     if i is None: break
       ...:

I see:

    ...
    <twopt.UserSnapshot object at 0x86a52f50>
    <twopt.UserSnapshot object at 0x86a55050>
    <twopt.UserSnapshot object at 0x86a55110>
    <twopt.UserSnapshot object at 0x86a551d0>
    <twopt.UserSnapshot object at 0x86a55290>
    <twopt.UserSnapshot object at 0x86a55350>
    None

My schema:

    class User(Base):
      __tablename__ = 'user'
      id = Column(Integer, primary_key=True)
      blob = Column(LargeBinary, nullable=False)
      since = Column(DateTime, nullable=False)

    class UserSnapshot(Base):
      __tablename__ = 'user_snapshot'
      id = Column(Integer, primary_key=True)
      uid = Column(Integer, ForeignKey(User.id), nullable=False)
      blob = Column(LargeBinary, nullable=False)
      time = Column(DateTime, nullable=False)

Short of dumping my entire DB, any hints as to what might cause `None`
to be returned?  I searched the documentation but couldn't find any
leads.  Thanks.

-- 
Yang Zhang
http://yz.mit.edu/

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to