Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/29.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google app engine db.get()与Model.get()的比较_Google App Engine_Datastore - Fatal编程技术网

Google app engine db.get()与Model.get()的比较

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() 谢谢你它们实际上是一模一

我已经开始处理数据存储,我发现我们可以通过这个方法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()

谢谢你

它们实际上是一模一样的。它们调用相同的RPC并具有相同的性能


唯一的区别是
Model.get
验证键是否与模型的类型匹配。

您也可以使用db.get()检索不同模型的实体列表。@CanBascil这是Drew在回答中提到的差异的直接结果。