如何用codesmith生成实体类里外键的表
来源:百度知道 编辑:UC知道 时间:2024/06/11 09:25:53
比如数据库里是
id int,主键
otherId int,外键(属于other表)
怎么用codeSmith生成一个other类的字段other呢
正确答案我已经找到了...
id int,主键
otherId int,外键(属于other表)
怎么用codeSmith生成一个other类的字段other呢
正确答案我已经找到了...
貌似实体类是根据表的字段创建属性的.所以...不能实现.
我建议你用视图把那两个表关联起来,人围加一个字段OtherId,然后再用视图去创建实体.
\
\纯属猜测.