0
votes

I am new to Google Cloud Platform and trying to do a POC for one of the project I have two queries -

Consider the following entity structure :

1. Trying to create using Google data store (console) -

  • Entity-name : Client
  • Namespace : foo

    { "_id" : "number", "name" : "string", "location" : "string", "project-config" : { "_id": "string", "description" :"string", "checklist" : { "name" : "string", "items" : { "Item-1" : "string", "Item-2" : "Integer", "Item-3" : "Date", "Item-n" : "type", "custom-added" :"type" } } } }

I was able to create one level embedded entity till "project-config" . However unable to figure out how to create another level of embedded entity(checklist) within project-config.

I referred Creating embedded entities with the datastore command line tool but it explains more on creating embedded value not nested embedded entity.

Second problem is ,I want to create a copy of the parent entity for multi-tenancy. I referred documentation from Google but it was not clear enough on how to actually create a copy https://cloud.google.com/datastore/docs/concepts/multitenancy

1

1 Answers

0
votes

Your first question was answered in a similar post - Datastore does not support this, you would need to convert the JSON format to a String first.

For your second issue, multitenancy in Datastore is achieved by using different namespaces. The documentation has examples of implementing multitenancy in Python, Java and Go