Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(632)

Unified Diff: service/datastore/multiarg.go

Issue 1358063003: Add Kind/StringID/IntID back to Key. (Closed) Base URL: https://github.com/luci/gae.git@add_allocate_ids
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« service/datastore/key.go ('K') | « service/datastore/key.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/datastore/multiarg.go
diff --git a/service/datastore/multiarg.go b/service/datastore/multiarg.go
index 61d18dc14814681789a95cc76b73131e445d6a88..6766f3706f737538c8c8db898fdbc39bb4e53a16 100644
--- a/service/datastore/multiarg.go
+++ b/service/datastore/multiarg.go
@@ -275,7 +275,7 @@ func newKeyObjErr(aid, ns string, src interface{}) (*Key, error) {
func setKey(src interface{}, key *Key) {
pls := mkPLS(src)
if pls.SetMeta("key", key) == ErrMetaFieldUnset {
- lst := key.Last()
+ lst := key.LastTok()
if lst.StringID != "" {
_ = pls.SetMeta("id", lst.StringID)
} else {
« service/datastore/key.go ('K') | « service/datastore/key.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698