阅读背景:

Django ForeignKey不需要参照完整性?

来源:互联网 

I'd like to set up a ForeignKey field in a django model which points to another table some of the time. But I want it to be okay to insert an id into this field which refers to an entry in the other table which might not be there. So if the row exists in the other table, I'd like to get all the benefits of the ForeignKey relationship. But if not, I'd like this treated as just a number. field in a djan




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: