Thank you for posting your questions here.

Though the examples here 
<https://cloud.google.com/appengine/articles/update_schema> are for Python, 
the behavior is the same for Javascript in Nodejs. Datastore is designed 
such that all entities need not have the same properties. Saving a given 
entity with new properties will add those properties and values to said 
entity. Other entities of the same kind may not have those same new 
properties. As documented in the aforementioned article, entities written 
to the Datastore after adding said properties will now have those 
properties. In addition, whenever an entity of that Kind is read, the 
entity will be populated with values for those new properties either using 
the data stored or default values you've specified. With this in mind, 
Datastore does not require that all entities have the same properties.

If you must query entities using these new properties however, you will 
need to update your existing entities. To do so, you'll essentially need to 
load all entities and save them again after setting values to said 
properties. This can be done using the Datastore APIs 
<http://googlecloudplatform.github.io/gcloud-node/#/docs/v0.29.0/datastore/dataset>
 
provided for Node and therefore do not require the use of Python.

In short, schemas do not automatically apply to all entities of a articular 
kind. That must be done manually by updating the entities with values for 
new or updated properties.

I hope this answers your questions.

On Wednesday, March 16, 2016 at 9:15:04 AM UTC-4, Varun Shivaprasad wrote:
>
> I created a new instance and deployed a nodejs based application. I am 
> using google datastore as database. Now i want to edit some fields in Kind. 
> Change properties of the fields that are already there and add some new 
> properties. If i do add new properties, they are not getting reflected in 
> the schema that is already there. How do I update schema now? Should i use 
> python now just to update schema or is there anyway i can do it from my 
> nodejs config.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/c06da72e-3d33-452f-99a4-81738ef351a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • [google-appengine]... Varun Shivaprasad
    • [google-appen... 'Nicholas (Google Cloud Support)' via Google App Engine

Reply via email to