stefanofontanelli/ColanderAlchemy — pull request #19 by davidjb (2013-03-16 00:04:10+00:00)
Title: Correct what setup_schema does, use unknown='ignore' by default, ensure 'missing' (non-required schema nodes) deserialize correctly

A largish pull request, but this is what it does (check individual commits for details on each):

* Correct what setup_schema does and fix function definition. After looking at the tests, I realise what it does now (expected to be attached to an event listener for SQLAlchemy). Fixed this and document it well, especially in the Quick Start area.

* Ensure that any schema nodes that should have a 'missing' value are specified in SQLAlchemy-suitable formats, rather than Colander-internal as they were before. Specifically, this relates to de/serialisation of null values. (Code now follows what http://docs.pylonsproject.org/projects/colander/en/latest/null.html#deserializing-null says)
* Mapped relationships are now configured as required or not required depending on their join condition. Custom configuration is possible in the standard CA fashion.

* Switch the mapped schema to follow Colander's default for unknown fields (which is to 'ignore' them) being deserialized. This makes sense as the default, especially if you need to add fields to the mapped schema (eg CSRF for Deform, etc) - and would be why it's Colander's default. If someone needs this, then it can be passed, as like any other Colander schema, as a keyword argument to __init__.

Also, fix tests to avoid a race condition when mapping classes. Tests would only pass occasionally due to the ordering of mapper definitions.