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: ModelA (ndb.model): mod_bs = ndb.KeyProperty (type = ModelB repeated = true) mod_cs = ndb.KeyProperty (like = ModelC repeated = true) # Other classes of properties ModelB (ndb. Model): mod_as = ndb.StringProperty (like = ModelA repeated = true) mod_cs = ndb.StringProperty (like = ModelC duplicated = true) # Class of other properties ModelC (ndb.Model): mod_cs = ndb.KeyProperty (type = ModelA , Repeated = true) mod_as = ndb.KeyProperty (like = ModelB repeated = True) # other properties

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

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -