I got an email asking about how to help with the ActiveMappper layer
that I have started on, and I thought it might be a good idea to send
my response to the mailing list, so other people could know what
needs to get done.
Ben Bangert wrote:
I've been watching your posts on the declarative layer, I'm rather
interested. What areas need looking at?
Thanks for offering your help! There are a few things that need to
be done:
1. Support for many-to-many relationships. This is possible now
by directly using mappers, but it doesn't have a `many_to_many`
declarative mapping yet like `one_to_one` and `one_to_many`.
This is probably a great place to start helping out.
2. Inheritance support. This will be a little more tricky, but
shouldn't be all that terrible. The `ActiveMapperMeta` metaclass
is currently using `assign_mapper` to bolt mappers onto classes,
and will need to be updated to pass an `inherits` kwarg to pass
the mapper of the superclass.
3. Improved dependency detection. I am currently doing some magic
in the metaclass to make sure that I don't need to require
that dependent classes are created in any particular order, but I
am not 100% sure that its bulletproof yet. I would love someone
else to take a crack at this, especially someone who has better
knowledge of SQLAlchemy internals than me.
4. In the test suite [1], there are some tests that are failing
either
because the code is wrong, or I don't understand something. We
need to address the failing tests either by fixing
ActiveMapper, or
fixing my brain :)
5. Documentation. Personally, I think that the API is pretty solid
already, but this should probably wait until the above are all
complete. Nevertheless, ActiveMapper needs complete
documentation
to complement all of the great documentation that is already
there.
Ben also wrote:
I should mention that I have some interest as well in expanding on
the declarative layer to include some extra information necessary
for richer automatic discovery of model-type information. How much
is working right now?
What do you mean exactly? Richer automatic discovery sounds good,
but I am not entirely sure what you are talking about :)
As for how much is currently working, I think it works pretty well
already, at least for many simple cases. Take a look in the
SQLAlchemy test suite for an example [1].
While I am at it, I have never asked this mailing list for any
feedback on ActiveMapper. Its starting to gain some traction with
other people, and Jeff Watkins has already integrated a patch into
TurboGears to make it possible to use ActiveMapper as a replacement
for SQLObject (thanks Jeff!). It would be great to make sure that
all the SQLAlchemy experts are happy with the direction it is going :)
[1] http://sqlalchemy.org/trac/browser/sqlalchemy/trunk/test/
activemapper.py
--
Jonathan LaCour
http://cleverdevil.org
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users