Fixes #811. Fixes reflinks
This commit is contained in:
		| @@ -462,10 +462,11 @@ class Document(BaseDocument): | |||||||
|             user.switch_db('archive-db') |             user.switch_db('archive-db') | ||||||
|             user.save() |             user.save() | ||||||
|  |  | ||||||
|         If you need to read from another database see |         :param str db_alias: The database alias to use for saving the document | ||||||
|         :class:`~mongoengine.context_managers.switch_db` |  | ||||||
|  |  | ||||||
|         :param db_alias: The database alias to use for saving the document |         .. seealso:: | ||||||
|  |             Use :class:`~mongoengine.context_managers.switch_collection` | ||||||
|  |             if you need to read from another collection | ||||||
|         """ |         """ | ||||||
|         with switch_db(self.__class__, db_alias) as cls: |         with switch_db(self.__class__, db_alias) as cls: | ||||||
|             collection = cls._get_collection() |             collection = cls._get_collection() | ||||||
| @@ -488,11 +489,12 @@ class Document(BaseDocument): | |||||||
|             user.switch_collection('old-users') |             user.switch_collection('old-users') | ||||||
|             user.save() |             user.save() | ||||||
|  |  | ||||||
|         If you need to read from another database see |         :param str collection_name: The database alias to use for saving the | ||||||
|         :class:`~mongoengine.context_managers.switch_db` |  | ||||||
|  |  | ||||||
|         :param collection_name: The database alias to use for saving the |  | ||||||
|             document |             document | ||||||
|  |  | ||||||
|  |         .. seealso:: | ||||||
|  |             Use :class:`~mongoengine.context_managers.switch_db` | ||||||
|  |             if you need to read from another database | ||||||
|         """ |         """ | ||||||
|         with switch_collection(self.__class__, collection_name) as cls: |         with switch_collection(self.__class__, collection_name) as cls: | ||||||
|             collection = cls._get_collection() |             collection = cls._get_collection() | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user