pymongo::son_manipulator::AutoReference Class Reference

Inheritance diagram for pymongo::son_manipulator::AutoReference:
Inheritance graph

List of all members.

Public Member Functions

def __init__
def transform_incoming
def transform_outgoing
def will_copy

Private Attributes


Detailed Description

Transparently reference and de-reference already saved embedded objects.

This manipulator should probably only be used when the NamespaceInjector is
also being used, otherwise it doesn't make too much sense - documents can
only be auto-referenced if they have an *_ns* field.

NOTE: this will behave poorly if you have a circular reference.

TODO: this only works for documents that are in the same database. To fix
this we'll need to add a DatabaseInjector that adds *_db* and then make
use of the optional *database* support for DBRefs.

Definition at line 110 of file

Member Function Documentation

def pymongo::son_manipulator::AutoReference::__init__ (   self,

Definition at line 124 of file

def pymongo::son_manipulator::AutoReference::transform_incoming (   self,
Replace embedded documents with DBRefs.

Reimplemented from pymongo::son_manipulator::SONManipulator.

Definition at line 132 of file

def pymongo::son_manipulator::AutoReference::transform_outgoing (   self,
Replace DBRefs with embedded documents.

Reimplemented from pymongo::son_manipulator::SONManipulator.

Definition at line 153 of file

def pymongo::son_manipulator::AutoReference::will_copy (   self  ) 
We need to copy so the user's document doesn't get transformed refs.

Reimplemented from pymongo::son_manipulator::SONManipulator.

Definition at line 127 of file

Member Data Documentation

Definition at line 125 of file

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines

Author(s): Bhaskara Marthi
autogenerated on Fri Jan 11 10:09:06 2013