You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DatastoreExample does a put, but does not do the get to retrieve it #41
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);
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.
Activity
ludoch commentedon Apr 3, 2015
Also, not sure we do a builder.set("f", 30);
What is f in the example?
ludoch commentedon Apr 3, 2015
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);
ludoch commentedon Apr 3, 2015
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.
aozarov commentedon Apr 8, 2015
I changed the exampls to demonstrate a full CRUD and usage of the two types of queries.
Merge pull request googleapis#41 from shinfan/dev
chore: include generated samples dir (#41)
deps: update dependency com.google.apis:google-api-services-cloudreso…
chore: Integrate new gapic-generator-java and rules_gapic (googleapis#41
chore(main): release 0.3.1-SNAPSHOT (googleapis#41)
build(deps): update dependency org.apache.maven.plugins:maven-deploy-…
chore(bazel): update protobuf to v3.21.3 (#41)
4 remaining items
deps: update dependency com.google.cloud:google-cloud-shared-dependen…
chore(main): release 0.1.1 (#35)
chore(main): release 0.1.0 (#9)
chore(main): release 0.1.3 (#30)
chore(main): release 0.1.1-SNAPSHOT (googleapis#41)
chore(main): release 0.1.1-SNAPSHOT (googleapis#41)
chore(main): release 0.1.1-SNAPSHOT (googleapis#41)
docs(regen): updated javadocs from protoc update (#41)
chore: generate common config files (#41)
Merge pull request #41 from anthmgoogle/version
docs(regen): updated javadocs from protoc update (googleapis#41)
Merge pull request #41 from anthmgoogle/version
chore: update common templates (#41)
chore: update common templates (#41)
chore: copy the emulator back into this repo. (googleapis#41)