On Nov 27, 2013, at 1:23 AM, 史永宏 shooting...@gmail.com wrote:
Hi,
Is there a solution for this issue today? Now I have a single table
Inheritance in table A, however, the type information is stored in another
table B linked from A with foreign key...
Now if I want to get polymorphic
This is super! Thanks Michael
On Wednesday, November 27, 2013 7:49:23 AM UTC-8, Michael Bayer wrote:
On Nov 27, 2013, at 1:23 AM, 史永宏 shoot...@gmail.com javascript: wrote:
Hi,
Is there a solution for this issue today? Now I have a single table
Inheritance in table A, however, the type
Hi,
Is there a solution for this issue today? Now I have a single table
Inheritance in table A, however, the type information is stored in another
table B linked from A with foreign key...
Now if I want to get polymorphic result when querying A, I got error ask me
to either use polymorphic or
Hi Timmy and Michael,
I was wandering here about the same problem. I have a table that defines
keys and value type (ie: key 'username', type 'unicode max 60' - that it is
a constant).
Then, I have the values table, which is polymorphic on value type and also
has a fk to keys table. I think it is
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,
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.
is there a way to implement this?
details:
this is what im
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 of C depending on A's type column. is there a way to do this?
On Wed, May 5,
what query do you want to see when 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
C/D objects doesn't exist without A and B? maybe walk up the graph:
C.b.a.type
im not sure this schema is sensible, if it's really bad, please advise, im
not attached to it!
thax!
On Wed, May 5, 2010 at 5:28 PM, Michael Bayer mike...@zzzcomputing.comwrote:
what query do you want to see when
I meant SQL.if you want to do polymorphic_on based on a.type it would 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,
thx, that is what i am wondering. they are one-to-one, maybe thats good
enough for performance. so there's no easy way to do this.
On Wed, May 5, 2010 at 5:44 PM, Michael Bayer mike...@zzzcomputing.comwrote:
I meant SQL.if you want to do polymorphic_on based on a.type it would
at the
11 matches
Mail list logo