具有两个类别和关系的形式
|
我在教义1.2中有:
User:
columns:
login: { type: string(255), notnull: true }
password: { type: string(255), notnull: true }
Student:
columns:
user_id: { type: integer, notnull: true }
school_name: { type: string(255) }
school_year: { type: integer(4) }
relations:
User: { onDelete: CASCADE, local: user_id, foreign: id }
Teacher:
columns:
user_id: { type: integer, notnull: true }
city: { type: string(255) }
street: { type: string(255) }
relations:
User: { onDelete: CASCADE, local: user_id, foreign: id }
如果我打开localhost / user / new有以下格式:
login:
password:
很好
如果我以格式打开localhost / student / new have:
user_id
school_name:
school_year:
但我想:
login:
password:
school_name:
school_year:
这该怎么做?感谢帮助!
没有找到相关结果
已邀请:
1 个回复
信藉乒
检查此示例,该示例完美说明了如何使用它。