import { RelationQueryBuilder } from "https://deno.land/x/typeorm@v0.2.23-rc10/src/index.ts";
Allows to work with entity relations and perform specific operations with those relations.
todo: add transactions everywhere
Methods
Adds (binds) given value to entity relation. Value can be entity, entity id or entity id map (if entity has composite ids). Value also can be array of entities, array of entity ids or array of entity id maps (if entity has composite ids). Works only for many-to-many and one-to-many relations. For many-to-one and one-to-one use #set method instead.
Adds (binds) and removes (unbinds) given values to/from entity relation. Value can be entity, entity id or entity id map (if entity has composite ids). Value also can be array of entities, array of entity ids or array of entity id maps (if entity has composite ids). Works only for many-to-many and one-to-many relations. For many-to-one and one-to-one use #set method instead.
Loads many entities (relational) from the relation. You can also provide ids of relational entities to filter by.
Loads a single entity (relational) from the relation. You can also provide id of relational entity to filter by.
Removes (unbinds) given value from entity relation. Value can be entity, entity id or entity id map (if entity has composite ids). Value also can be array of entities, array of entity ids or array of entity id maps (if entity has composite ids). Works only for many-to-many and one-to-many relations. For many-to-one and one-to-one use #set method instead.
Sets entity relation's value. Value can be entity, entity id or entity id map (if entity has composite ids). Works only for many-to-one and one-to-one relations. For many-to-many and one-to-many relations use #add and #remove methods instead.