sorry if this is addressed, but i'm running
apache2
SQLAlchemy 0.5.8
Pylons 1.0
Python 2.5.2
and on a simple page (just retrieve data from DB), I get:
Error - class 'sqlalchemy.exc.OperationalError': (OperationalError) (2006,
'MySQL server has gone away')
every few other requests, not after a
?referer=WARWICKP
On 15/10/2010, at 7:48 AM, Timmy Chan wrote:
sorry if this is addressed, but i'm running
apache2
SQLAlchemy 0.5.8
Pylons 1.0
Python 2.5.2
and on a simple page (just retrieve data from DB), I get:
Error - class 'sqlalchemy.exc.OperationalError': (OperationalError
i have 4 tables, a, b, c, d.
a has one-to-many relation with b, b with one-to-one relationship with c, c
is a polymorphic on a.type, with d being one of the polymorphic types.
is there a way to implement this?
details:
this is what im trying to do in sqlalchemy:
a = Table('a', metadata,
, 2010 at 5:15 PM, Michael Bayer mike...@zzzcomputing.comwrote:
On May 5, 2010, at 5:01 PM, Timmy Chan wrote:
i have 4 tables, a, b, c, d.
a has one-to-many relation with b, b with one-to-one relationship with c, c
is a polymorphic on a.type, with d being one of the polymorphic types
you select C and D objects ?
On May 5, 2010, at 5:26 PM, Timmy Chan wrote:
thx, is there a way to set that up, or something similar?
after giving it thought, maybe polymorphic_on isn't what i need. in some
sense, table A is similar to a generic container, and i want to constrain
the type
at the very least need to issue:
SELECT c.*, a.type JOIN b ON c.b_id = b.id JOIN a ON b.a_id=a
which is an expensive way to get to where you're going. It can be done of
course but not through relation().
On May 5, 2010, at 5:36 PM, Timmy Chan wrote:
C/D objects doesn't exist without A and B
i have a few polymorphic tables, and i want to sort by a column in one of
the relationship.
i have tables a,b,c,d, with relationship a to b, b to c, c to d.
a to b is one-to-many b to c and c to d are one-to-one, but polymorphic.
given an item in table a, i will have a list of items b, c, d