Google Cloud Platform DataStore connector for loopback
###Disclaimer: This is a forked version of loopback-connector-gdatastore
npm install loopback-connector-gcp-datastore --save
"gdatastore": {
"name": "gdatastore",
"connector": "loopback-connector-gcp-datastore",
"projectId": "gcloud-project-id",
"namespace": "datastore-namespace"
}
"options": {
"remoting": {
"sharedMethods": {
"*": false,
"find": true,
"create": true,
"findById": true,
"deleteById": true,
"replaceById": true,
"prototype.patchAttributes": 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, updateAttributes, replaceById, deleteById
and