-Original Message-
From: sqlalchemy@googlegroups.com
[mailto:sqlalch...@googlegroups.com] On Behalf Of gizli
Sent: 02 September 2009 04:45
To: sqlalchemy
Subject: [sqlalchemy] Curious Problem
Hi all,
I just discovered something weird when doing concurrency testing with
my
secondary requires a Table object as its argument. it is not
recommended to create a relation that uses a mapped table as its
secondary unless the relation specifies viewonly=True.
Jae Kwon wrote:
Is there a way to declaratively create many to many relationships
where the 'secondary'
gizli wrote:
Hi all,
I just discovered something weird when doing concurrency testing with
my program. Before writing a simplified test case for it and really
figuring out whether its a bug with sqlalchemy (I am using 0.5.5), I
wanted to write the scenario here. Basically I was getting the
Thanks for looking.
What happens when viewonly=False?
I tried appending/popping from the list of related secondary objects
but I didn't see any duplicate inserts/deletes.
- Jae
On Sep 2, 2009, at 8:16 AM, Michael Bayer wrote:
secondary requires a Table object as its argument. it is
naktinis wrote:
I tried calling .subquery() method on each union subquery like this:
q1 = Thing.query().filter(...).order_by(Thing.a.desc()).limit
(1).subquery()
q2 = Thing.query().filter(...).order_by(Thing.a.asc()).limit
(1).subquery()
q = q1.union(q2).order_by(Thing.id)
I know you're
Jae Kwon wrote:
Thanks for looking.
What happens when viewonly=False?
I tried appending/popping from the list of related secondary objects
but I didn't see any duplicate inserts/deletes.
if you create new entities on the secondary table, and also insert
records in the relation() with the
On 2 Rugs, 20:41, Michael Bayer mike...@zzzcomputing.com wrote:
naktinis wrote:
I tried calling .subquery() method on each union subquery like this:
q1 = Thing.query().filter(...).order_by(Thing.a.desc()).limit
(1).subquery()
q2 = Thing.query().filter(...).order_by(Thing.a.asc()).limit
if you create new entities on the secondary table, and also insert
records in the relation() with the secondary, it will persist them
separately.
I see that now.
I have found myself using this pattern, however, since relation +
secondary can create more efficient joins than an eagerload