Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Questa pagina descrive come modificare un'entità utilizzando Google Cloud console.
Per scoprire come modificare un'entità a livello di programmazione, consulta Aggiornamento di un'entità.
Prima di iniziare
Questa pagina presuppone che tu abbia già creato un'entità archiviata in
Firestore in modalità Datastore. Puoi creare un'entità tramite l'API Datastore come descritto in Guida introduttiva all'API Datastore o tramite l'editor di entità in Google Cloud console come descritto nella guida rapida.
Seleziona un'entità da modificare
Nella console Google Cloud , vai alla pagina Database.
Nel menu di navigazione, fai clic su Datastore Studio.
Trova l'entità che vuoi modificare specificando lo spazio dei nomi, il tipo e/o
i filtri per i valori delle proprietà. Per scoprire come fare, vedi Eseguire una query.
Fai clic su Nome/ID di un'entità. La schermata dovrebbe essere simile a questa:
Modificare una proprietà
Apri la pagina Modifica entità per un'entità.
Nella sezione Proprietà, fai clic su Modificaedit per la proprietà da modificare.
Nel riquadro Modifica proprietà, modifica Nome, Tipo o Valore della proprietà. Puoi anche modificare l'indicizzazione della proprietà. Per scoprire
l'impatto dell'inclusione o dell'esclusione di una proprietà dagli indici, consulta
Proprietà escluse.
Fai clic su Fine. Il riquadro Modifica proprietà si chiude e la tabella delle proprietà ora mostra le modifiche. Le modifiche non vengono eseguite
nel database finché non fai clic su Salva. La tabella delle proprietà evidenzia
le modifiche non commit con un punto blu accanto al nome della proprietà.
Apporta ulteriori modifiche ad altre proprietà. Al termine delle modifiche,
fai clic su Salva per applicare le modifiche al database.
La console esegue il commit delle modifiche e ti riporta alla pagina Datastore Studio.
Aggiungi una proprietà
Apri la pagina Modifica entità per un'entità. Fai clic su Aggiungi proprietà.
Nel riquadro Aggiungi una proprietà, specifica un nome per la proprietà.
Seleziona un tipo per il tipo di dati della proprietà.
Specifica un valore per la proprietà.
Specifica se la proprietà è indicizzata. Per scoprire l'impatto dell'inclusione o dell'esclusione di una proprietà dagli
indici, consulta Proprietà escluse.
Fai clic su Aggiungi. Il riquadro Aggiungi una proprietà si chiude e la tabella delle proprietà ora mostra le modifiche. Le modifiche non vengono eseguite
nel database finché non fai clic su Salva. La tabella delle proprietà evidenzia
le modifiche non commit con un punto blu accanto al nome della proprietà.
Apporta ulteriori modifiche ad altre proprietà. Al termine delle modifiche,
fai clic su Salva per applicare le modifiche al database.
La console esegue il commit delle modifiche e ti riporta alla pagina Datastore Studio.
Eliminare una proprietà
Apri la pagina Modifica entità per un'entità. Nella sezione Proprietà, fai clic su
Eliminadelete
per la proprietà da eliminare.
La tabella delle proprietà ora mostra le modifiche. Le modifiche non vengono
commitate al database finché non fai clic su Salva. La tabella delle proprietà
evidenzia le eliminazioni di proprietà non confermate con nomi e valori
delle proprietà barrati.
Puoi annullare un'eliminazione non eseguita facendo clic su Ripristina
nella riga della tabella della proprietà.
Apporta ulteriori modifiche ad altre proprietà. Al termine delle modifiche,
fai clic su Salva per applicare le modifiche al database.
Proprietà complesse
L'editor di entità supporta proprietà con tipi complessi come Array e
Embedded entity.
Proprietà array
Quando aggiungi o modifichi il valore di una proprietà Array, fornisci un valore in formato JSON.
Se inserisci un JSON non valido per il campo Valore, riceverai un messaggio di errore. Non potrai aggiungere la proprietà se il JSON non è valido.
Proprietà dell'entità incorporata
Quando aggiungi o modifichi il valore di una proprietà Embedded entity, fornisci un valore in formato JSON.
Se inserisci un JSON non valido per il campo Valore, riceverai un messaggio di errore. Non potrai aggiungere la proprietà se il JSON non è valido.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-05 UTC."],[[["\u003cp\u003eThis guide details the process of editing entities within the Google Cloud console's Datastore Studio, which assumes an entity has already been created in Firestore in Datastore mode.\u003c/p\u003e\n"],["\u003cp\u003eTo edit an entity, you can find the entity in Datastore Studio, and then on the Edit Entity page you can modify a property's name, type, value, or index status, or add new properties with specific data types and index settings.\u003c/p\u003e\n"],["\u003cp\u003eYou can also delete a property from an entity, with uncommitted deletions being highlighted and restorable, and remember that no changes are saved to the database until you click "Save".\u003c/p\u003e\n"],["\u003cp\u003eWhen working with array or embedded entity properties, it is required that you input values in valid JSON format to prevent errors.\u003c/p\u003e\n"]]],[],null,["# Edit an entity in the console\n\nThis page describes how to edit an entity using the [Google Cloud console](https://console.cloud.google.com/).\n\nTo learn how to modify an entity programmatically, see [Updating an entity](/datastore/docs/concepts/entities#updating_an_entity).\n\nBefore you begin\n----------------\n\nThis page assumes you have already created an entity that is stored in\nFirestore in Datastore mode. You can create an entity through the\nDatastore API as described in\n[Getting Started with the Datastore API](/datastore/docs/datastore-api-tutorial), or through the entity\neditor in the [Google Cloud console](https://console.cloud.google.com/) as described in the [Quickstart](/datastore/docs/store-query-data).\n\nSelect an entity to edit\n------------------------\n\n1. In the Google Cloud console, go to the **Databases** page.\n\n [Go to Databases](https://console.cloud.google.com/datastore/databases)\n2. Select the required database from the list of databases.\n\n3. In the navigation menu, click **Datastore Studio**.\n\n4. Find the entity you want to edit by specifying the namespace, kind, and/or\n filters for property values. To learn how, see [Run a query](/datastore/docs/store-query-data#run_a_query).\n\n5. Click on the **Name/ID** of an entity. Your screen should look similar to the\n following:\n\n### Edit a property\n\n1. Open the **Edit Entity** page for an entity.\n Under **Properties** , click **Edit** edit for the property you want to edit.\n\n | **Tip:** You can filter the properties table. Click **Filter properties** at the top of the table.\n2. In the **Edit property** pane, modify the property's **Name** , **Type** ,\n or **Value** . You can also modify whether the property is indexed. To learn\n about the impact of including or excluding a property from indexes, see\n [Excluded properties](/datastore/docs/concepts/indexes#unindexed_properties).\n\n3. Click **Done** . The **Edit property** pane closes and the\n properties table now shows your changes. Changes are not committed\n to the database until you click **Save**. The properties table highlights\n uncommitted changes with a blue dot next to the property name.\n\n4. Make additional changes to other properties. When you complete your edits,\n click **Save** to commit your changes to the database.\n\n The console commits your changes and takes you back to the **Datastore Studio** page.\n\n### Add a property\n\n1. Open the **Edit Entity** page for an entity. Click **Add property**.\n2. In the **Add a property** pane, specify a name for the property.\n3. Select a type for the property's data type.\n4. Specify a value for the property.\n5. Specify whether the property is indexed. To learn about the impact of including or excluding a property from\n indexes, see [Excluded properties](/datastore/docs/concepts/indexes#unindexed_properties).\n\n6. Click **Add** . The **Add a property** pane closes and the\n properties table now shows your changes. Changes are not committed\n to the database until you click **Save**. The properties table highlights\n uncommitted changes with a blue dot next to the property name.\n\n7. Make additional changes to other properties. When you complete your edits,\n click **Save** to commit your changes to the database.\n\n The console commits your changes and takes you back to the **Datastore Studio** page.\n\n### Delete a property\n\n1. Open the **Edit Entity** page for an entity. Under **Properties** , click\n **Delete** delete\n for the property you want to delete.\n\n2. The properties table now shows your changes. Changes are not\n committed to the database until you click **Save**. The properties table\n highlights uncommitted property deletions with crossed out names and property\n values.\n\n You can undo an uncommitted deletion by clicking **Restore**\n in the property's table row.\n3. Make additional changes to other properties. When you complete your edits,\n click **Save** to commit your changes to the database.\n\nComplex properties\n------------------\n\nThe entity editor supports properties with complex types such as `Array` and\n`Embedded entity`.\n\n### Array properties\n\nWhen you add or modify the value of an `Array` property, provide a value in JSON\nformat.\n\nIf you enter invalid JSON for the **Value** field you will receive an error\nmessage. You will not be able to add the property if the JSON is invalid.\n\n### Embedded entity properties\n\nWhen you add or modify the value of an `Embedded entity` property, provide a\nvalue in JSON format.\n\nIf you enter invalid JSON for the **Value** field you will receive an error\nmessage. You will not be able to add the property if the JSON is invalid.\n\nWhat's next\n-----------\n\n- Learn about [best practices for entities](/datastore/docs/best-practices#entities)."]]