A nested LocalStructuredProperty does not save in a way that can be read from Legacy NDB (proposal for a one-line fix included) #940
Labels
api: datastore
Issues related to the googleapis/python-ndb API.
Description
I have a model that looks like this:
When saving the
Parent
entity, I found that the resulting properties would be:Possible fix
I traced the issue to
_to_datastore()
underclass LocalStructuredProperty
ingoogle/cloud/ndb/model.py
line 4497 where it setsdata[self._name] = legacy_values
:I believe it should be
data[prefix + self._name]
so that the legacy value is stored under the right property name including the prefix.Thanks!
The text was updated successfully, but these errors were encountered: