Is there any way to get SQLAlchemy to only load specific columns through a
relationship()?
For example, with this scenario:
class Parent(Base):
__tablename__ = 'parent'
id = Column(Integer, primary_key=True)
children = relationship("Child", lazy='joined')
class Child(Base):
__tablename__ = 'child'
id = Column(Integer, primary_key=True)
parent_id = Column(Integer, ForeignKey('parent.id'))
cheap_column = Column(Unicode(10))
expensive_column = Column(LargeBinary)
I'd like Child to get lazily joined when Parent is loaded, but only with
Child's "cheap_column" and not it's "expensive_column".
Thanks,
Seth
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.