Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
srinjoyray committed Oct 28, 2024
1 parent e3f4cf2 commit dc4c3f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public static void addPropertiesToPb(Map<String, ?> map, EntityProto.Builder pro
}
}

/** @see #addPropertiesToPb(Map, EntityProto) */
/** @see #addPropertiesToPb(Map, EntityProto.Builder) */
static void addPropertiesToPb(Map<String, ?> map, com.google.datastore.v1.Entity.Builder proto) {
for (Map.Entry<String, ?> entry : map.entrySet()) {
proto.putProperties(entry.getKey(), toV1Value(entry.getValue()).build());
Expand All @@ -260,9 +260,9 @@ private static void addListPropertyToPb(
}
property.getValue(); // Indicate to the proto that we have set this field
if (indexed) {
proto.addProperty(property.build());
proto.addProperty(property);
} else {
proto.addRawProperty(property.build());
proto.addRawProperty(property);
}
} else {
// Write every element to the PB
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,11 @@ public static EntityProto convertToPb(Entity entity) {

// If we've already been stored, make sure the entity group is set
// to match our key.
Path.Builder entityGroup = proto.getEntityGroup().toBuilder();
Path.Builder entityGroup = proto.getEntityGroupBuilder();
Key key = entity.getKey();
if (key.isComplete()) {
entityGroup.addElement(reference.getPath().getElement(0));
}

DataTypeTranslator.addPropertiesToPb(entity.getPropertyMap(), proto);
return proto.build();
}
Expand Down

0 comments on commit dc4c3f1

Please sign in to comment.