I just completed mapping 100~ tables from our production Oracle database. Along the way I noticed that many relationships were not modelling. Mostly foreign keys.
Should I modify my mappings to include the appropriate relationships? Or should I keep the mapping as is to reflect the database 100%?
I'm more inclined the map the appropriate relationships to clarify how the tables relate to each other. Here is an example of what I mean.
[ActiveRecord("Incident")]
public class Incident : ActiveRecordBase<Incident>
{
[PrimaryKey("IncidentId")]
public int IncidentId { get; set; }
[Property(Column = "CustomerOut")]
public int CustomersOut { get; set; }
[Property(Column = "DistrictNumber")]
public int DistrictNumber { get; set; }
}
[ActiveRecord("District")]
public class District : ActiveRecordBase<District>
{
[PrimaryKey("DistrictNumber")]
public int DistrictNumber { get; set; }
[Property(Column = "DistrictName")]
public string DistrictName { get; set; }
}
As you can see, the DistrictNumber column from the Incident table is not FK (BelongsTo) relationship even though I believe it should be.