latest trunk also lets the literal('foo').label('bar') thing work too
On Mar 21, 2007, at 4:24 PM, Toshio Kuratomi wrote:
> On Wed, 2007-03-21 at 16:11 -0400, Michael Bayer wrote:
>> the literal('c') compiles into a bind parameter, which is not able to
>> "export" itself as a column on its enclosing "selectable", so thats
>> that error (i might want to look into adding a better error for that
>> one, had never seen it before). you want to use a newer function
>> literal_column("c"). the change in 0.3.5 is that saying column
>> ("something") is going to apply case sensitivity rules to the string
>> inside...since yours has '' inside of it, it says, "oh i have to
>> quote that". so literal_column() disables all quoting rules (and its
>> whats used inside of the polymorphic_union function now).
>
> Thanks Michael!
>
> literal_column("'c'").label('kind') seems to be working well.
>
> -Toshio
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---