class documentation

class CircularDependencyError(SQLAlchemyError):

View In Hierarchy

Raised by topological sorts when a circular dependency is detected.

There are two scenarios where this error occurs:

  • In a Session flush operation, if two objects are mutually dependent on each other, they can not be inserted or deleted via INSERT or DELETE statements alone; an UPDATE will be needed to post-associate or pre-deassociate one of the foreign key constrained values. The post_update flag described at :ref:`post_update` can resolve this cycle.
  • In a _schema.MetaData.sorted_tables operation, two _schema.ForeignKey or _schema.ForeignKeyConstraint objects mutually refer to each other. Apply the use_alter=True flag to one or both, see :ref:`use_alter`.
Method __init__ Undocumented
Method __reduce__ Undocumented
Instance Variable cycles Undocumented
Instance Variable edges Undocumented

Inherited from SQLAlchemyError:

Method __str__ Undocumented
Method __unicode__ Undocumented
Method ​_message Undocumented
Method ​_sql​_message Undocumented

Inherited from HasDescriptionCode (via SQLAlchemyError):

Method ​_code​_str Undocumented
Instance Variable code Undocumented
def __init__(self, message, cycles, edges, msg=None, code=None):
def __reduce__(self):

Undocumented

cycles =

Undocumented

edges =

Undocumented