On May 6, 2008, at 12:28 PM, [EMAIL PROTECTED] wrote:

> #Interactive debugger >>> is stuff I executed
>>>> print Session.query(Job).all()
> [None]
>
>>>> print Session.query(Job).first()
> None
>

heres other things to try.

1. you are on SQLAlchemy 0.4.5.

2. do not use any 3rd party Python REPL tools like IPython.  all kinds  
of weird things seem to happen with those.

3. sess = create_session()
     j = sess.query(Job).first()
    assert j is not None

4. j1 = Job()
     assert repr(j1) != 'None'

5. use pdb to trace through the query.all() process.  methods to look  
at are Query.iterate_instances(), Mapper._instance().   
Mapper._instance never returns None (its not really possible).


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to