Catherine Devlin wrote: > > When populating objects through the ORM, I'd like to interpret all > NULL values fetched from VARCHAR2 / NVARCHAR2 columns in the database > as empty strings ('') instead of `None`s. > > Is there any way to set that behavior globally? Failing that, how > would you recommend doing it?
use a TypeDecorator that creates that behavior. To get a "global" effect, perhaps in your imports make sure that your custom type overrides the usage of String/Unicode in your Table definitions. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---