On 5/21/15 3:56 PM, Russ wrote:
nope. I'd need a complete, self-contained and succinct example I
can run, thanks
Ok, thanks. This is a beefy one so that will be extremely tricky to
extract. I had hoped that the combo of lazy+joined would have been a
clear indicator since they
On 5/21/15 4:32 PM, Rich Shepard wrote:
There are a number of many-to-one table/class relationships in the
application. In the many class I use ForeignKey() to relate that
column to
the appropriate 'one' class and column.
Reading the ORM tutorial tells me that the relationship()
Yes, 'number' is a column, as you surmised. When I drop that from the path
it works fine. The only remaining problem is/was that this ends up loading
in every field in the child_product table, and this includes a potentially
massive BSON column (and more).
After looking into this, I've now
On Thu, 21 May 2015, Mike Bayer wrote:
I think the best use case is to put it on both, using back_populates.
This is the focus of current documentation:
http://docs.sqlalchemy.org/en/rel_1_0/orm/backref.html
It's more verbose but I think it's clearer and functionally this is what
backref does
There are a number of many-to-one table/class relationships in the
application. In the many class I use ForeignKey() to relate that column to
the appropriate 'one' class and column.
Reading the ORM tutorial tells me that the relationship() function can be
in either table. I can specify the
On Thu, 21 May 2015, Mike Bayer wrote:
I think the best use case is to put it on both, using back_populates.
Validation check: am I correctly using relationship() in the following set
of three tables? (N.B. Other columns removed for clarity and space saving.)
class Agencies(Base):
I opened a questions with example (pseudo) code on stackoverflow for
that.
http://stackoverflow.com/questions/30287042/how-to-use-make-transient-to-duplicate-an-sqlalchemy-mapped-object
I know the question how to duplicate or copy a SQLAlchemy mapped object
was asked a lot of times. The answer
On 5/21/15 3:25 PM, Russ wrote:
I have a query I am running where sqlalchemy is throwing this exception:
Exception: can't locate strategy for class
'sqlalchemy.orm.properties.ColumnProperty' (('lazy', 'joined'),)
What causes this is the addition of this joinedload_all option to a
query
I have a query I am running where sqlalchemy is throwing this exception:
Exception: can't locate strategy for class
'sqlalchemy.orm.properties.ColumnProperty' (('lazy', 'joined'),)
What causes this is the addition of this joinedload_all option to a query
(q):
q =
nope. I'd need a complete, self-contained and succinct example I can run,
thanks
Ok, thanks. This is a beefy one so that will be extremely tricky to
extract. I had hoped that the combo of lazy+joined would have been a clear
indicator since they are opposite loading strategies.
Digging
10 matches
Mail list logo