NULL ForeignKeyTo property in Subsonic 3/ASP.NET MVC?

Posted by chad on Stack Overflow See other posts from Stack Overflow or by chad
Published on 2009-06-10T13:34:47Z Indexed on 2010/04/17 3:23 UTC
Read the original article Hit count: 274

Issue: the primary key of the base table is named differently than the the key in the fk table.

Subsonic 3 does not know how to handle that, which is fine, its beta. So I was going to change the Html.ControlFor logic to just grab the table and use the pkname from that:

var fk = db.FindTable(col.ForeignKeyTo.FriendlyName);

However the .ForeignKeyTo is null. Where in the templates does that ITable get populated?

© Stack Overflow or respective owner

Related posts about subsonic3

Related posts about subsonic-v3p2