LoopbackRelatedClient Class
Loopback Client to access to PersistedModel (or extenders) via one-to-many relation
Item Index
Methods
count
-
[where]
Return the number of records that match the optional "where" filter.
Parameters:
-
[where]Object optional
Returns:
create
-
data
Create new instance of Model class, saved in database
Parameters:
-
dataObject
Returns:
destroy
-
data
Destroy model instance
Parameters:
-
dataObject
Returns:
destroyById
-
id
Destroy model instance with the specified ID.
Parameters:
-
idString
Returns:
exists
-
id
Check whether a model instance exists in database.
Parameters:
-
idString
Returns:
find
-
filter
Find all model instances that match filter specification.
Parameters:
-
filterObject
Returns:
findById
-
id
Find object by ID.
Parameters:
-
idString
Returns:
findOne
-
filter
Find one model instance that matches filter specification. Same as find, but limited to one result
Parameters:
-
filterObject
Returns:
request
-
path -
params -
http_method
sends request to Loopback
Parameters:
-
pathString -
paramsObjectrequest parameters
-
http_methodString{GET|POST|PUT|DELETE}
Returns:
setAccessToken
-
id
set id of the "one" model
Parameters:
-
idAny
Returns:
updateAll
-
where -
data
Update multiple instances that match the where clause
Parameters:
-
whereObject -
dataObject
Returns:
updateAttributes
-
data
Update set of attributes.
Parameters:
-
dataObject
Returns:
upsert
-
data
Update or insert a model instance The update will override any specified attributes in the request data object. It won’t remove existing ones unless the value is set to null.
Parameters:
-
dataObject
