Google Cloud Datastore Connector for Loopback.io
npm install loopback-connector-gclouddatastore --save
"gcdatastore": {
"name": "gcdatastore",
"connector": "loopback-connector-gclouddatastore",
"projectId": "gcloud-project-id",
"namespace": "datastore-namespace"
}
"options": {
"remoting": {
"sharedMethods": {
"*": false,
"find": true,
"create": true,
"update": true,
"findById": true,
"deleteById": true
}
}
}
Add the following configuration to your model
"properties": {
...
"parent": {
"type": "string",
"required": true
}
},
"relations": {
"parentEntity": {
"model": "parentEntityModel",
"foreignKey": "parent",
"type": "belongsTo"
}
}
find, findById, create, update, deleteById
and, order, sort