Skip to main content

UpdateConnection

Updates existing Connection objects that satisfy the specified constraints.

Parameters

Details

If the ref parameter is used, with_class and constraints will be ignored.

If the ref parameter is specified, it must refers to the search results of a FindConnection within the transaction.

Examples

Find the connection of class "FriendWith" with a particular "since" property, and remove the "last_connected" property:


[{
"UpdateConnection": {
"with_class": "FriendWith",
"constraints": {
"since": ["==", 1998]
},
"remove_props": ["last_seen_together"]
}
}]

Find the connection of class "HasBeen" with a particular "year" property, and change/add two new properties:


[{
"UpdateConnection": {
"with_class": "HasBeen",
"constraints": {
"year": ["==", 2002]
},
"properties": {
"year": 2001,
"month": "June"
}
}
}]