Skip to content

datastore: field name cannot end with '.' #41

@fredr

Description

@fredr

I'm trying to update to the latest appengine pkg in our project (from a very old version), but running in to problems with our PropertyLoadSaver.

When embedding a type like this:

type SpecialTime struct {
	time.Time
}

and then using it in an entity saved in datastore, the datastore field will end with a dot. Which is not allowed due to this loc.

Here is a minimal repro: https://github.com/fredr/datastoreloadsavetest
it uses our current version of the appengien pkg (267c27e) and works fine, the props will be (notice the ending dot in EmbeddedTime):

[{Name:EmbeddedTime. Value:2016-12-19 10:49:23.280860142 +0000 UTC NoIndex:false Multiple:false} {Name:NormalTime Value:2016-12-19 10:49:23.280860121 +0000 UTC NoIndex:false Multiple:false}]

Updating the appengine packages to the latest will produce this error:

datastore: cannot load field "EmbeddedTime." into a "appenginetest.TestEntity": field name cannot end with '.'

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions