caosadvancedtools.datamodel_problems module#

Implements a class for finding and storing missing entities, either record types or properties, that are missing in a data model. They can be inserted by hand or gueesed from possible exceptions when inserting or updating entities with missing parents and/or properties.

class caosadvancedtools.datamodel_problems.DataModelProblems#

Bases: object

Collect and store missing RecordTypes and Properties.

static add(ent)#

Add a missing record type or property.

static evaluate_exception(e)#

Take a TransactionError, see whether it was caused by datamodel problems, and update missing parents and/or properties if this was the case. Afterwards, raise the exception.

Parameters:

e (TransactionError) – TransactionError, the children of which are checked for possible datamodel problems.

missing = {}#