Unique list of entity metadatas of this subject.
Insert subjects needs to be sorted.
Gets dependency tree for all entity metadatas with non-nullable relations. We need to execute insertions first for entities which non-nullable relations.
Gets dependency tree for all entity metadatas with non-nullable relations. We need to execute insertions first for entities which non-nullable relations.
Extracts all unique metadatas from the given subjects.
Removes already sorted subjects from this.subjects list of subjects.
Sorts (orders) subjects in their topological order.
Sorts given graph using topological sorting algorithm.
Algorithm is kindly taken from https://github.com/marcelklehr/toposort repository.
Generated using TypeDoc
Orders insert or remove subjects in proper order (using topological sorting) to make sure insert or remove operations are executed in a proper order.