File: __init__.py

package info (click to toggle)
sqlalchemy 0.6.3-3%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 10,744 kB
  • ctags: 15,132
  • sloc: python: 93,431; ansic: 787; makefile: 137; xml: 17
file content (10 lines) | stat: -rw-r--r-- 624 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
"""
Illustrates polymorphic associations, a method of associating a particular child object with many different types of parent object.

This example is based off the original blog post at `<http://techspot.zzzeek.org/?p=13>`_ and illustrates three techniques:

* ``poly_assoc.py`` - imitates the non-foreign-key schema used by Ruby on Rails' Active Record.
* ``poly_assoc_fk.py`` - Adds a polymorphic association table so that referential integrity can be maintained.
* ``poly_assoc_generic.py`` - further automates the approach of ``poly_assoc_fk.py`` to also generate the association table definitions automatically.

"""