On Sep 22, 2013, at 10:11 PM, Jeff Peck <[email protected]> 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')
>
>>> there's a recipe for this at this blog post, you might consider building
> on it's general example:
> http://techspot.zzzeek.org/2011/05/17/magic-a-new-orm/
>>> the missing link is to just use mapping events to set things up at the
> appropriate time.
>
>
> Michael,
> Your cats are awesome! I remember reading this the day you put it out there,
> but I just didn't understand it at the time. I've been going over this and
> now I understand it perfectly! Any chance of pulling some of this back into
> sqlalchemy? many_to_many alone saves quite a bit of boilerplate code.
i dont really think there's any near term chance, because it makes for a more
confusing API. not much long term chance either unless I stumble across some
way that it could be not in conflict with how everything else works. the point
of the blog post is that these helpers can be built out.
signature.asc
Description: Message signed with OpenPGP using GPGMail
