Star

Created With

linkDeleting Relationshhips

linkDeleting Relationshhips via the Model static

Using the deleteRelationships static of a Model and providing a Where parameter, relationships of the Model can be deleted

1linkawait Users.deleteRelationships({

2link /* --> the Relationshhips to be deleted will be matched using this param */

3link where: {

4link /* --> (optional) the relationship(s) to be deleted need to be from a User with the name 'John' AND the id '1' */

5link source: {

6link name: 'John',

7link id: 1,

8link },

9link /* --> (optional) the relationship(s) to be deleted need to be to an Order with the id '2' */

10link target: {

11link id: 1,

12link },

13link /* --> (optional) the relationship(s) to be deleted need to be match the following properties */

14link relationship: {

15link rating: 5,

16link status: 'completed',

17link },

18link },

19link /* --> (optional) an existing session or transaction to use */

20link session: null,

21link});

Deleting RelationshhipsDeleting Relationshhips via the Model static

Introduction Getting Started

Modelschevron_right

Sessions and Transactions

Query Builderchevron_right
Query Runnerchevron_right

Bind Parameters

Where Parameters