abujehad139 / google-api-go-client

Automatically exported from code.google.com/p/google-api-go-client
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Datastore: Indexed as false doesn't get transmitted (i.e. remains true gcd side) #54

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Setting the Indexed field of a property to false will result in it being 
ommited from the generated JSON request (due to it being defined as 
"omitempty"), and as such, the default "indexed" value will be used server 
side, which will be true most of the time (e.g. for strings).

Removing the omitempty solves the issue:
Indexed bool `json:"indexed"`

What version of the product are you using? On what operating system?
datastore v1beta2

Original issue reported on code.google.com by pete...@gmail.com on 14 Jan 2014 at 10:18