sqlalchemy.ext.automap.automap_base documentation error

Issue #3415 resolved
Winfried Plappert created an issue

In chapter http://docs.sqlalchemy.org/en/rel_1_0/orm/extensions/automap.html?highlight=automap#sqlalchemy.ext.automap.automap_base the classmethod prepare contais some errorneous extra information:

"classmethod prepare(engine=None, reflect=False, classname_for_table=<function classname_for_table at 0x7f26087aaed8>, collection_class=<type 'list'>, name_for_scalar_relationship=<function name_for_scalar_relationship at 0x7f26087ac398>, name_for_collection_relationship=<function name_for_collection_relationship at 0x7f26087ac410>, generate_relationship=<function generate_relationship at 0x7f26087ac488>)"

further down in the same chapter the method sqlalchemy.ext.automap.generate_relationship contanis the parameter "direction" which is described as "direction¶ – indicate the “direction” of the relationship; this will be one of ONETOMANY, MANYTOONE, MANYTOONE." Remove one "MANYTOONE".

Comments (5)

  1. Mike Bayer repo owner

    classmethod prepare(engine=None, reflect=False, classname_for_table=<function classname_for_table at 0x7f26087aaed8>, collection_class=<type 'list'>, n

    that's not really "erroneous" information. These attributes are defaulted to a series of constants and functions that are in the module. The autodoc that we use with Sphinx outputs them this way but we don't have much option with autodoc to make this come out differently. It would be nice if this could be formatted better but there's no simple way to do that right now.

    further down in the same chapter the method sqlalchemy.ext.automap.generate_relationship contanis the parameter "direction" which is described as "direction¶ – indicate the “direction” of the relationship; Remove one "MANYTOONE".

    oh. not remove, that should be "MANYTOMANY".

  2. Log in to comment