- changed status to resolved
Documentation update for Column's type as None when column is a ForeignKey
I'd like to make a documentation update proposal about assigning None to a Column's datatype when the column is a ForeignKey. (from topic http://groups.google.com/group/sqlalchemy/browse_thread/thread/ca304be8b26355c6)
The following code is an update to the generated documentation: http://www.sqlalchemy.org/docs/docstrings.myt#docstrings_sqlalchemy.schema_Column
""" type: the TypeEngine for this column. This can be any subclass of types.AbstractType, including the database-agnostic types defined in the types module, database-specific types defined within specific database modules, or user-defined types. A type with a value of None can be specified if the column is a ForeignKey column. This will assign the same type as the referenced column, avoiding code redundancy and inconsistance if ever the referenced column's type is changed. """
Then I suppose the documentation can be changed from:
Column('user_id', Integer, ForeignKey('users.user_id')))
to
Column('user_id', None, ForeignKey('users.user_id')))
Regards, Alex Conrad
Comments (2)
-
repo owner -
repo owner - removed milestone
Removing milestone: 0.3.2 (automated comment)
- Log in to comment
i put the docstring in in changeset:2146. as far as the main docs, im holding off as I dont want the "metadata" chapter to be more dense than it already is.