Skip to content

DatastoreExample does a put, but does not do the get to retrieve it #41

Closed

Description

@ludoch

DatastoreExample does a put, but does not call the get to retrieve it:-)

Activity

  1. ludoch commented on Apr 3, 2015

    @ludoch
    ContributorAuthor

    Also, not sure we do a builder.set("f", 30);
    What is f in the example?

  2. ludoch commented on Apr 3, 2015

    @ludoch
    ContributorAuthor

    I think we should replace
    System.out.println("Going to modify entity: " + entity);
    Entity.Builder builder = Entity.builder(entity);
    builder.set("f", 30);
    datastore.put(entity);
    with
    System.out.println("Going to modify entity: " + entity);
    Entity.Builder builder = Entity.builder(entity);
    entity = builder.set("age", 40).build(); //set Age to 40!!!
    datastore.put(entity);

  3. ludoch commented on Apr 3, 2015

    @ludoch
    ContributorAuthor

    Finally the last part of the example:
    System.out.println("Trying again to get the entity by its key!");
    key = Key.builder(dataset, "Person", "Jimmy").build();
    System.out.println("Got entity: " + entity);

    does nothing with the key, so the entity is not really retrieved and just go the value from the last update.

    I guess we need a full CRUD example, with a possible query example as well.

  4. aozarov commented on Apr 8, 2015

    @aozarov
    Contributor

    I changed the exampls to demonstrate a full CRUD and usage of the two types of queries.

  5. added a commit that references this issue on Mar 29, 2016
  6. 4 remaining items

  7. added a commit that references this issue on Feb 24, 2026
  8. added a commit that references this issue on Mar 12, 2026
  9. added a commit that references this issue on Mar 30, 2026
  10. added a commit that references this issue on Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

🚨 criticalP0 critical issue. Requires immediate fixtriage meI really want to be triaged.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions