)
})
-The declarative form of the above is described in :ref:`declarative_sql_expressions`.
+For many-to-many relationships, use :func:`.and_` to join the fields of the
+association table to both tables in a relation::
+
+ from sqlalchemy import and_
+
+ mapper(Author, authors, properties={
+ 'book_count': column_property(
+ select([func.count(books.c.id)],
+ and_(
+ book_authors.c.author_id==authors.c.id,
+ book_authors.c.book_id==books.c.id
+ )))
+ })
+
+For examples of :func:`.column_property` using Declarative, see
+:ref:`declarative_sql_expressions`.
Note that :func:`.column_property` is used to provide the effect of a SQL
expression that is actively rendered into the SELECT generated for a