Get an Objectify Entity's Key
问题 Dummy question. I create my POJO Objectify entity (for example, "Category") and persist it. Then I retrieve it via a query. I want to use it in a one-to-may relationship e.g. want to set my category to one or more "Products". I will have this in my "Product"'s code: Key<Categoria> categoria; So the question is: how can I find my retrieved entity's key for setting it in my product? 回答1: I'm usually adding an extra method: @Transient Key<Categoria> getKey() { return Key.create(Categoria.class,