Thursday, October 16, 2008

datastore的一个索引bug?

自动生成的index.yaml里面多出来一个
# Unused in query history -- copied from input.
- kind: Comment
properties:
- name: True
direction: desc
奇怪了,model里面我没有name为True的property。

问题出来了,model里面有个name为yes的property,在dev环境下yes的indexes自动生成并且是生效的,查询成功,update到GAE上并不会生效,查询失败的,提示需要这个索引,奇怪了?

找了很久的原因,最后把问题给解决了。

在一个model的里面不能取叫yes的property,否则datastore会认为是True,就会产生一个为True的indexs,恰恰这个
indexs从未被使用过,并且本应name叫yes的的indexs反而不能生效,就导致问题产生,也许是GAE的一个bug吧,我现在的问题就是这样解决的。

No comments: