UPDATE: After further testing, it seems this issue affects all child entities in my entity group. My root parent for all these different instances is User kind, which is my own creation, not the built in User kind. After removing the parent=user from the constructor of the child Kind, the get_by_key_name works as expected. However, I would like to be able to use the Entity Group functionality along with the defined keys, if that is possible.
-- Hi, I am attempting to use defined key names for speedier querying in my GAE project.
However, I have run into an odd issue where I cannot fetch they key. This code does not seem to work:
for l in Logins.all().fetch():
print Login.get_by_key_name(l.key().name())
Some notes:
- I have only tested in the SDK
l.key().name() Returns the key name string listed with the entity when I look in the data store. I can copy and paste the string out of the data story and use that as the arg to get_by_key_name() and that does not work either.
keynames for the Login kind are all prefixed with an "l" (i.e. lowercase "L") and are other wise all lowercase and may contain underscores or dashes but are under 500 bytes.
Other kind serches like this work.
- The key is a interpolation of 2 properties of the Login kind, and I can fetch the objects just fine using regular .filter() methods
- The "parent" for the instances is a User class. (mentioning in case this has some bearing on the way I have to fetch)
So I have to ask, is there any obvious reasons why this would not work? Any known issues with key name searches using the SDK?