Michael Bayer escreveu: > Luis Bruno wrote: > > items = dict() > > for field in self._sa_class_manager.keys(): > > items[field] = getattr(self, field) > > > > Is there a simpler way, perhaps? > > obj.__dict__ is available as always for reading, I'd think thats the > easiest way to get at current object state.
True. I had been using .c.keys() to get database-only attributes because I have some extra methods and attributes . I'll use a '_' prefix as you suggested. Thank you, -- Luis Bruno --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---