1
我需要一个一对多的关系为我的1.4 +学说1.2条款项目。 我复制就像这样的关系:Symfony +学说+一对多关系
User:
columns:
id:
type: integer(4)
primary: true
autoincrement: true
contact_id:
type: integer(4)
username:
type: string(255)
password:
type: string(255)
Phonenumber:
columns:
id:
type: integer(4)
primary: true
autoincrement: true
name:
type: string(255)
user_id:
type: integer(4)
relations:
User:
foreignAlias: Phonenumbers
然后,我重建我的架构,并为用户和PhoneNumber后端模块。
在电话号码管理员面板中,我可以通过用户的选择框来设置用户。 但是在用户管理面板中,我没有一个包含电话号码的列表来允许用户为用户选择多个电话号码。 如何在这里添加许多关系?
我认为国外参考文献需要'user_id',但你已经知道了+1 @ – nortron 2010-03-03 22:07:52
@Cryo ......的确,感谢您的纠正。 – Tom 2010-03-03 22:38:34