English 中文(简体)
长期主动登记和外国关键财产名称
原标题:Subsonic ActiveRecord and foreign key property names
  • 时间:2009-09-12 21:07:40
  •  标签:

我在座的第一个问题,是:

因此,我想到一个新网站,由于我 m忙地再次 same着同样的 st子,我希望尽可能使用“一代”友好的 st子。

This has made me take a peek at the SubSonic project (have been looking at the other stuff created by Rob as well) and I really like the concept. The only thing on my mind is the scenario where I have created my database-model using the ASP.NET "build-in" Membership provider.

The stuff I am currently facing is the fact that if I have, for example, a News table with an EditorID and a CreatorID column which are both a foreign key to the aspnet_Users table, this gets me in to kind of a trouble. The properties generated on my News class will be named aspnet_Users and aspnet_Users1

Is there some way of hijacking this process and having it make use of the foreign key name or something? I would like to have these properties called Editor and Creator of course.

这是可能的吗?

问题回答

我的第一项想法是,你不想这样做(FK对成员表)。 虽然方便,但你还是把你的设计重新归为另一个可能成为一个问题的系统。

我可能建议的是,有一个中间桌——如果你愿意的话,用户——离开科索沃信托公司的关系。

尽管如此,你还是应当能够 t清模板(假设你重新使用3.0),以便满足你的需要。





相关问题
热门标签