Given the arbitrary example below, I can't ever recall actually using the
FooKeyword association table other than to set up mappings. I came up with
a brute force method to generate the secondary table for me
automatically, and I'm hoping someone can show me a better way to do this.
My goal
On Sep 22, 2013, at 5:24 PM, jpeck peck.j...@gmail.com wrote:
And replace it with something like this:
class Keyword(Base):
snip (same as before)
class Foo(Base):
snip
keywords = generate_many_to_many_for_me('Foo', 'Keyword')
And replace it with something like this:
class Keyword(Base):
snip (same as before)
class Foo(Base):
snip
keywords = generate_many_to_many_for_me('Foo', 'Keyword')
there's a recipe for this at this blog post, you might consider
On Sep 22, 2013, at 10:11 PM, Jeff Peck peck.j...@gmail.com wrote:
And replace it with something like this:
class Keyword(Base):
snip (same as before)
class Foo(Base):
snip
keywords = generate_many_to_many_for_me('Foo', 'Keyword')