Keys without a name or id are considered equal if all other aspects of the keys
are equal (as they will not be assigned IDs by the datastore when embedded).
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[[["\u003cp\u003e\u003ccode\u003eEmbeddedEntity\u003c/code\u003e is a property value that holds embedded entity properties and an optional \u003ccode\u003eKey\u003c/code\u003e, similar to \u003ccode\u003eEntity\u003c/code\u003e but with key differences.\u003c/p\u003e\n"],["\u003cp\u003eUnlike \u003ccode\u003eEntity\u003c/code\u003e, \u003ccode\u003eEmbeddedEntity\u003c/code\u003e is not queryable when stored in the datastore, and its \u003ccode\u003eKey\u003c/code\u003e is optional.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eEmbeddedEntity\u003c/code\u003e compares its embedded properties in addition to the \u003ccode\u003eKey\u003c/code\u003e when using the \u003ccode\u003e#equals(Object)\u003c/code\u003e and \u003ccode\u003e#hashCode()\u003c/code\u003e methods.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eEmbeddedEntity\u003c/code\u003e keys without a name or id are considered equal if all other key aspects match, because the datastore won't assign IDs to embedded keys.\u003c/p\u003e\n"],["\u003cp\u003eYou can convert between \u003ccode\u003eEntity\u003c/code\u003e and \u003ccode\u003eEmbeddedEntity\u003c/code\u003e using the \u003ccode\u003esetKey\u003c/code\u003e and \u003ccode\u003esetPropertiesFrom\u003c/code\u003e methods.\u003c/p\u003e\n"]]],[],null,["# Class EmbeddedEntity (2.0.0)\n\n public final class EmbeddedEntity extends PropertyContainer\n\nA property value containing embedded entity properties (and optionally a Key).\n\nThis class is similar to [Entity](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.Entity), but differs in the following ways:\n\n- [#equals(Object)](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.EmbeddedEntity#com_google_appengine_api_datastore_EmbeddedEntity_equals_) and [#hashCode()](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.EmbeddedEntity#com_google_appengine_api_datastore_EmbeddedEntity_hashCode__) compare the embedded properties in addition to the Key.\n- It is not queryable when stored in the datastore.\n- A Key is optional.\n- Keys without a name or id are considered equal if all other aspects of the keys are equal (as they will not be assigned IDs by the datastore when embedded).\n\nTo convert from an [Entity](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.Entity) use: \n\n\n EmbeddedEntity sv = new EmbeddedEntity();\n sv.setKey(entity.getKey())\n sv.setPropertiesFrom(entity)\n \nTo convert to an [Entity](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.Entity) use: \n\n\n Entity entity = new Entity(sv.getKey())\n entity.setPropertiesFrom(sv);\n \nInheritance\n-----------\n\n[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e [PropertyContainer](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.PropertyContainer) \\\u003e EmbeddedEntity \n\nInherited Members\n-----------------\n\n[PropertyContainer.appendPropertiesTo(StringBuilder)](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.PropertyContainer#com_google_appengine_api_datastore_PropertyContainer_appendPropertiesTo_java_lang_StringBuilder_) \n[PropertyContainer.clone()](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.PropertyContainer#com_google_appengine_api_datastore_PropertyContainer_clone__) \n[PropertyContainer.getProperties()](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.PropertyContainer#com_google_appengine_api_datastore_PropertyContainer_getProperties__) \n[PropertyContainer.getProperty(String)](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.PropertyContainer#com_google_appengine_api_datastore_PropertyContainer_getProperty_java_lang_String_) \n[PropertyContainer.hasProperty(String)](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.PropertyContainer#com_google_appengine_api_datastore_PropertyContainer_hasProperty_java_lang_String_) \n[PropertyContainer.isUnindexedProperty(String)](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.PropertyContainer#com_google_appengine_api_datastore_PropertyContainer_isUnindexedProperty_java_lang_String_) \n[PropertyContainer.removeProperty(String)](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.PropertyContainer#com_google_appengine_api_datastore_PropertyContainer_removeProperty_java_lang_String_) \n[PropertyContainer.setIndexedProperty(String,Object)](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.PropertyContainer#com_google_appengine_api_datastore_PropertyContainer_setIndexedProperty_java_lang_String_java_lang_Object_) \n[PropertyContainer.setPropertiesFrom(PropertyContainer)](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.PropertyContainer#com_google_appengine_api_datastore_PropertyContainer_setPropertiesFrom_com_google_appengine_api_datastore_PropertyContainer_) \n[PropertyContainer.setProperty(String,@Nullable Object)](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.PropertyContainer#com_google_appengine_api_datastore_PropertyContainer_setProperty_java_lang_String__org_checkerframework_checker_nullness_qual_Nullable_java_lang_Object_) \n[PropertyContainer.setUnindexedProperty(String,Object)](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.PropertyContainer#com_google_appengine_api_datastore_PropertyContainer_setUnindexedProperty_java_lang_String_java_lang_Object_) \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) \n[Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)\n\nConstructors\n------------\n\n### EmbeddedEntity()\n\n public EmbeddedEntity()\n\nMethods\n-------\n\n### clone()\n\n public EmbeddedEntity clone()\n\n**Overrides** \n[PropertyContainer.clone()](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.PropertyContainer#com_google_appengine_api_datastore_PropertyContainer_clone__)\n\n### equals(@Nullable Object obj)\n\n public boolean equals(@Nullable Object obj)\n\n**Overrides** \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-)\n\n### getKey()\n\n public @Nullable Key getKey()\n\nReturns the key or `null`.\n\n### hashCode()\n\n public int hashCode()\n\n**Overrides** \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--)\n\n### setKey(@Nullable Key key)\n\n public void setKey(@Nullable Key key)\n\n### toString()\n\n public String toString()\n\n**Overrides** \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--)"]]