Handle scalar values in from_obj

Issue #792 resolved
Former user created an issue

I tried:

    select( [some things ... ](...),
            from_obj = table1.outerjoin(table2, table1.fgn_key = table2.key) )

and got very unfriendly:

   iteration over non-sequence

message. Adding [ ] helped, the clause below is OK:

    select( [some things ... ](...),
            from_obj = [ table1.outerjoin(table2, table1.fgn_key = table2.key) ] )

but ... wouldn't it make sense to add this if in from_obj parameter handling? Even in SQLAlchemy docs most cases where from_obj is used refer to single value...

Comments (1)

  1. Log in to comment