nofeardb.orm.OneToMany

class nofeardb.orm.OneToMany(class_name, back_populates=None, cascade: Optional[List[str]] = None)

Bases: Relationship

descriptor for one to many relationships

back_populate_reverse_relationship(instance)

execute back population on related items

clear_reverse_relationship(instance)

remove back populated properties on related items

get_relation(instance) List[Document]

get the relationship from the instance

set_relationships_added(instance: Document, added_documents: List[Document])

track a relationship to another document as added

set_relationships_removed(instance: Document, removed_documents: List[Document])

track a relationship to another document as removed