This question is locked. New answers and comments are not allowed.
I'm trying to do forward mapping with a 1-many relationship (the classic primary key-foreign key scenario). However, when I try it, I find that Open Access gives me the two entity tables in the database, plus an intermediate linking table - what I'd expect if I was modelling a many-many relationship but not a 1-many relationship. How do I get forward mapping to give me the correct table structure in this situation?
In more detail, if it's needed:
My classes look like this:
The tabes I get are:
dbo.admin_district
dbo.country
dbo.country_admin_district <-- relationships go through here. But I shouldn't need this for a 1-many relationship
In more detail, if it's needed:
My classes look like this:
[Telerik.OpenAccess.Persistent()]
public
class
Country
{
public
IList<AdminDistrict> AdminDistricts {
get
;
set
; }
// other properties etc. commented out
}
[Telerik.OpenAccess.Persistent()]
public
class
AdminDistrict
{
public
Country Country {
get
;
set
; }
// other properties etc. commented out
}
The tabes I get are:
dbo.admin_district
dbo.country
dbo.country_admin_district <-- relationships go through here. But I shouldn't need this for a 1-many relationship