I am and that's awesome. Thank you! On Thursday, May 16, 2013 2:47:47 PM UTC-4, Michael Bayer wrote: > > if you're on 0.8 this is all available via the various getters on mapper: > http://docs.sqlalchemy.org/en/rel_0_8/orm/mapper_config.html#sqlalchemy.orm.mapper.Mapper.attrs > > > On May 16, 2013, at 1:37 PM, Jonathan Vanasco > <jona...@findmeon.com<javascript:>> > wrote: > > I've been using a utility method 'columns_as_dict' to help store my data > in a cache. It works well. > > A problem I've encountered... i need to access the related data that i've > eagerloaded. > > My current function looks like this > > def columns_as_dict(self): > as_dict = dict( > (col.name, getattr(self, col.name)) > for col in > sqlalchemy_orm.class_mapper(self.__class__).mapped_table.c > ) > return *as_dict* > * > * > any idea how i can access the foreign relations ? i'm specifically > interested in ones that are already eagerloaded, but am also interested in > accessing all of the relations in general. > > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sqlalchemy+...@googlegroups.com <javascript:>. > To post to this group, send email to sqlal...@googlegroups.com<javascript:> > . > Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > > >
-- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. For more options, visit https://groups.google.com/groups/opt_out.