2007年03月12日 星期一 12:57
"不支持联合主键",如果必须用到怎么办? 在07-2-20,大郎 <iexper at gmail.com> 写道: > > 啊?这样?多谢多谢,呵~ > > On 2/20/07, vicalloy <zbirder at gmail.com> wrote: > > > > 只能有一个主键(不支持联合主键),但可以有多个索引字段。 > > 你把主键和索引给搞混了。 > > > > 在 07-2-19,大郎<iexper at gmail.com > 写道: > > > 在 Django的文档中看到关于主键的说明是: > > > > > > > > > > primary_key=True implies blank=False, null=False and unique=True. > > Only one > > > primary key is allowed on an object. > > > > > > > > > http://www.djangoproject.com/documentation/model_api/ > > > > > > > > > 一个model只能有一个主键?这样的? > > > 根据我以往的了解和经验:如果要用于排序的字段特别是数值类型的字段,设为主键能加快查询速度地。。。。 > > > -- > > > 人生若只如初见…… > > > _______________________________________________ > > > python-chinese > > > Post: send python-chinese at lists.python.cn > > > Subscribe: send subscribe to > > > python-chinese-request at lists.python.cn > > > Unsubscribe: send unsubscribe to > > > python-chinese-request at lists.python.cn > > > Detail Info: > > > http://python.cn/mailman/listinfo/python-chinese > > > > > _______________________________________________ > > python-chinese > > Post: send python-chinese at lists.python.cn > > Subscribe: send subscribe to python-chinese-request at lists.python.cn > > Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > -- > 人生若只如初见…… > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -- Put the fun back into computing.Use Linux,BSD -------------- next part -------------- An HTML attachment was scrubbed... URL: http://python.cn/pipermail/python-chinese/attachments/20070312/0dd69270/attachment.html
Zeuux © 2025
京ICP备05028076号