This page describes how to edit an entity using the Google Cloud console .
To learn how to modify an entity programmatically, see Updating an entity .
Before you begin
This page assumes you have already created an entity that is stored in Firestore in Datastore mode. You can create an entity through the Datastore API as described in Getting Started with the Datastore API , or through the entity editor in the Google Cloud console as described in the Quickstart .
Select an entity to edit
-
In the Google Cloud console, go to the Databasespage.
-
Select the required database from the list of databases.
-
In the navigation menu, click Datastore Studio.
-
Find the entity you want to edit by specifying the namespace, kind, and/or filters for property values. To learn how, see Run a query .
-
Click on the Name/IDof an entity. Your screen should look similar to the following:

Edit a property
-
Open the Edit Entitypage for an entity. Under Properties, click Edit for the property you want to edit.
-
In the Edit propertypane, modify the property's Name, Type, or Value. You can also modify whether the property is indexed. To learn about the impact of including or excluding a property from indexes, see Excluded properties .

-
Click Done. The Edit propertypane closes and the properties table now shows your changes. Changes are not committed to the database until you click Save. The properties table highlights uncommitted changes with a blue dot next to the property name.
-
Make additional changes to other properties. When you complete your edits, click Saveto commit your changes to the database.
The console commits your changes and takes you back to the Datastore Studiopage.
Add a property
- Open the Edit Entitypage for an entity. Click Add property.
- In the Add a propertypane, specify a name for the property.
- Select a type for the property's data type.
- Specify a value for the property.
-
Specify whether the property is indexed. To learn about the impact of including or excluding a property from indexes, see Excluded properties .

-
Click Add. The Add a propertypane closes and the properties table now shows your changes. Changes are not committed to the database until you click Save. The properties table highlights uncommitted changes with a blue dot next to the property name.
-
Make additional changes to other properties. When you complete your edits, click Saveto commit your changes to the database.
The console commits your changes and takes you back to the Datastore Studiopage.
Delete a property
-
Open the Edit Entitypage for an entity. Under Properties, click Delete for the property you want to delete.

-
The properties table now shows your changes. Changes are not committed to the database until you click Save. The properties table highlights uncommitted property deletions with crossed out names and property values.
You can undo an uncommitted deletion by clicking Restorein the property's table row.
-
Make additional changes to other properties. When you complete your edits, click Saveto commit your changes to the database.
Complex properties
The entity editor supports properties with complex types such as Array
and Embedded entity
.
Array properties
When you add or modify the value of an Array
property, provide a value in JSON
format.

If you enter invalid JSON for the Valuefield you will receive an error message. You will not be able to add the property if the JSON is invalid.
Embedded entity properties
When you add or modify the value of an Embedded entity
property, provide a
value in JSON format.

If you enter invalid JSON for the Valuefield you will receive an error message. You will not be able to add the property if the JSON is invalid.
What's next
- Learn about best practices for entities .

