Sample code from Mapfish SQLAlchemy tutorial