diff options
author | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2014-05-31 14:06:45 +0200 |
---|---|---|
committer | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2014-05-31 14:06:45 +0200 |
commit | ad056787937844809b48dd36311dac0f8bd4c0ab (patch) | |
tree | 1738064a62e19441d2bd5a49a559a434c8187dd4 /docs/orms.rst | |
parent | 790e8ea2db7a68d7074809124dfd82c3b05b925b (diff) | |
download | factory-boy-ad056787937844809b48dd36311dac0f8bd4c0ab.tar factory-boy-ad056787937844809b48dd36311dac0f8bd4c0ab.tar.gz |
doc: Document upgrade path for FACTORY_*.
Diffstat (limited to 'docs/orms.rst')
-rw-r--r-- | docs/orms.rst | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/docs/orms.rst b/docs/orms.rst index 6a942a6..2aa27b2 100644 --- a/docs/orms.rst +++ b/docs/orms.rst @@ -273,7 +273,7 @@ SQLAlchemy Factoy_boy also supports `SQLAlchemy`_ models through the :class:`SQLAlchemyModelFactory` class. -To work, this class needs an `SQLAlchemy`_ session object affected to the ``Meta.sqlalchemy_session`` attribute. +To work, this class needs an `SQLAlchemy`_ session object affected to the :attr:`Meta.sqlalchemy_session <SQLAlchemyOptions.sqlalchemy_session>` attribute. .. _SQLAlchemy: http://www.sqlalchemy.org/ @@ -286,6 +286,11 @@ To work, this class needs an `SQLAlchemy`_ session object affected to the ``Meta * :func:`~factory.Factory.create()` uses :meth:`sqlalchemy.orm.session.Session.add` * :func:`~factory.Factory._setup_next_sequence()` selects the next unused primary key value + .. attribute:: FACTORY_SESSION + + .. deprecated:: 2.4.0 + See :attr:`~SQLAlchemyOptions.sqlalchemy_session`. + .. class:: SQLAlchemyOptions(factory.base.FactoryOptions) In addition to the usual parameters available in :class:`class Meta <factory.base.FactoryOptions>`, @@ -293,7 +298,8 @@ To work, this class needs an `SQLAlchemy`_ session object affected to the ``Meta .. attribute:: sqlalchemy_session - Fields whose SQLAlchemy session object are passed will be used to communicate with the database + SQLAlchemy session to use to communicate with the database when creating + an object through this :class:`SQLAlchemyModelFactory`. A (very) simple exemple: |