django-nonrel on Google App Engine - Implications of using ListField for ManyToMany

僤鯓⒐⒋嵵緔 提交于 2019-12-06 04:49:47

Well as you probably know, you will be spanning the relationship more manually. Django cannot help quite as much as when using ManyToMany, but it should not be that big a problem.

Depending on the complexity of the relationship, you might want to consider building a model just for this purpose.

I have never used that approach on GAE, since IMO its only valid when an object has alot relations (more than 50 I would say) or when the lookups you plan to do, will benefit from this. Maybe because they start at either end of the relationship with equal frequency or it would be nice to be able to loop over the relationships to display them or something along those lines.

Last time I made something on GAE I used the ListField (or ListProperty as it was known then) since most of the objects only had about 20 related objects and the lookups would rarely go the other way.

So all in all, its not a big deal and I don't remember it as any kind of a pain to work with/around.

Hope this was helpful despite it being rather "IMO"

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!