python - NDB many-to-many KeyProperty kind reference not working -
After
I am trying to connect different entities with one another with KeyProperties in App Engine like this:
But I'm saying that "ModelB" is undefined in this structure to get an error. Obviously, whatever is referred to below is not recognized. So if I get rid of some kind of work in Model A and Model B, then in Model C they are fine and everything runs. I need to refer them to circuit form, and it seems like I should work.
Am I doing something wrong?
In such cases, you can pass as the form of a string:
class ModelA (ndb.Model): mod_bs = ndb.KeyProperty (type = 'ModelB', repeatedly = true) mod_cs = ndb.KeyProperty (like = 'ModelC', repeated = true) # other properties < / Code>
Comments
Post a Comment