Google app engine db.get()与Model.get()的比较
我已经开始处理数据存储,我发现我们可以通过这个方法get()获取实例,这个方法在db和Model类中都可用。但是他们之间有什么区别我不觉得我的问题是Google app engine db.get()与Model.get()的比较,google-app-engine,datastore,Google App Engine,Datastore,我已经开始处理数据存储,我发现我们可以通过这个方法get()获取实例,这个方法在db和Model类中都可用。但是他们之间有什么区别我不觉得我的问题是 1. how its working in background to get the Instance of an Model 2. how the performance wise of use db.get() and Model.get() 3. When use db.get() and Model.get() 谢谢你它们实际上是一模一
1. how its working in background to get the Instance of an Model
2. how the performance wise of use db.get() and Model.get()
3. When use db.get() and Model.get()
谢谢你它们实际上是一模一样的。它们调用相同的RPC并具有相同的性能
唯一的区别是
Model.get
验证键是否与模型的类型匹配。您也可以使用db.get()检索不同模型的实体列表。@CanBascil这是Drew在回答中提到的差异的直接结果。