From 2cee9cb24378920c08e20a922bc22f0ab28c74f0 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 15 Feb 2009 20:43:14 +0000 Subject: - Added an attribute helper method ``set_committed_value`` in sqlalchemy.orm.attributes. Given an object, attribute name, and value, will set the value on the object as part of its "committed" state, i.e. state that is understood to have been loaded from the database. Helps with the creation of homegrown collection loaders and such. - documented public attributes helper functions. --- doc/build/mappers.rst | 1 - doc/build/reference/orm/mapping.rst | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/build/mappers.rst b/doc/build/mappers.rst index cb770415e..89db6a0a7 100644 --- a/doc/build/mappers.rst +++ b/doc/build/mappers.rst @@ -1673,7 +1673,6 @@ Note that eager/lazy loading options cannot be used in conjunction dynamic relat Setting Noload ~~~~~~~~~~~~~~~ - The opposite of the dynamic relation is simply "noload", specified using ``lazy=None``: .. sourcecode:: python+sql diff --git a/doc/build/reference/orm/mapping.rst b/doc/build/reference/orm/mapping.rst index 9605fcb10..3f3e51ef3 100644 --- a/doc/build/reference/orm/mapping.rst +++ b/doc/build/reference/orm/mapping.rst @@ -60,6 +60,30 @@ Utilities .. autofunction:: clear_mappers +Attribute Utilities +------------------- +.. autofunction:: sqlalchemy.orm.attributes.del_attribute + +.. autofunction:: sqlalchemy.orm.attributes.get_attribute + +.. autofunction:: sqlalchemy.orm.attributes.get_history + +.. autofunction:: sqlalchemy.orm.attributes.init_collection + +.. function:: sqlalchemy.orm.attributes.instance_state + + Return the :class:`InstanceState` for a given object. + +.. autofunction:: sqlalchemy.orm.attributes.is_instrumented + +.. function:: sqlalchemy.orm.attributes.manager_of_class + + Return the :class:`ClassManager` for a given class. + +.. autofunction:: sqlalchemy.orm.attributes.set_attribute + +.. autofunction:: sqlalchemy.orm.attributes.set_committed_value + Internals --------- -- cgit v1.2.1