开发者

Google App Engine retrieve user defined key name

开发者 https://www.devze.com 2023-01-05 19:13 出处:网络
Is there a way to retrieve the key name you set using: Model( key_name = ... ... ) I tried using the key() method but开发者_开发问答 that returns the one Google makes.It is key().name()

Is there a way to retrieve the key name you set using:

Model(
  key_name = ...
  ...
)

I tried using the key() method but开发者_开发问答 that returns the one Google makes.


It is key().name()

Docs on the Key class


I was searching for the solution in my case of NDB datastore. check NDB Key link.

With NDB model, you have to use model.key.string_id()

0

精彩评论

暂无评论...
验证码 换一张
取 消