Andrew wrote:
>
> I also went ahead and checked the raw output of query.all()--it worked
> correctly; all the IDs were retrieved and displayed in raw format:
> "Decimal(###)" and so on.  HOWEVER, when parsing those rows using a
> simple for loop, a'la
>
>         str = ""
>         for row in query.all():
>             if row.sync_session_sid == None:
>                 str = str + "None<br>\n"
>             else:
>                 str = str + "%d<br>\n" % row.sync_session_sid
>
>         return str
>
> Which then returns:
>
>     468811
>     None
>     468721
>
> In other words, the *raw data* that it returns is good.  The mapping
> to objects is not.

query.all() returns a list of tuples (well, an ad-hoc subclass of tuple
that provides the named attributes).   if query.all() is correct, then
it's correct.   I notice you are comparing to None using "==".  What
happens if you change that to "is"?


--~--~---------~--~----~------------~-------~--~----~
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