I am looking at
http://www.sqlalchemy.org/trac/browser/examples/generic_associations/discriminator_on_association.py
and trying to adapt the example to one that is generic and can be
reused. So I attempted to abstract all the classes. However there
seems to be an error in the __new__ function of
line 21 creates an AssociationBase passing two arguments to the constructor,
but AssociationBase has no __init__ and accepts no arguments.
I'd strongly recommend using pdb to track down issues like these.
On Oct 2, 2011, at 5:26 AM, Ahmed wrote:
I am looking at
I have an impedance mismatch problem, namely a model in X categories,
each having its own set of fields and all having a set of common fields.
I solved that with:
1. master table, contains the sequenced pkey and common fields, as
well as category discriminator
2. individual category tables
Ah, a solution just came to me. If I had 10 categories and denormalized
the user_id into them, I can reverse the queries and do only 10 selects,
filtered by user_id and joined with the master table on pkey. I'd end up
with equal number of rows selected, but only 10 queries issued. The