Can one map multiple classes to one storage entity ie table? Potential issue with Colliding IDs
Posted: Fri 26 Apr 2013 11:07
Hi,
I am looking into the mapping of multiple Entities(Classes) onto one generic storage entity(Table). Theoretically this is all possible within ED, but I get an error about colliding IDs:
1 Problem in mapping fragments starting at line 426:EntitySets 'tClient1s' and 'Classes' are both mapped to table 'Classes'. Their primary keys may collide.
D:\Projects\MyProject\MyProject.Models\MyProject.edml
I can see the problem. The underlying table has its ID column set to INT32 and is an Identity column so autogenerates the PK.
Can I do this? How do I get around this error?
Thanks.
P.S I am currently mapping my Classes one to one with DB Views(Storage Objects) and this works fine. However I have just realised I should not need to set up DB Views as well since this is just another layer of mapping.
I am looking into the mapping of multiple Entities(Classes) onto one generic storage entity(Table). Theoretically this is all possible within ED, but I get an error about colliding IDs:
1 Problem in mapping fragments starting at line 426:EntitySets 'tClient1s' and 'Classes' are both mapped to table 'Classes'. Their primary keys may collide.
D:\Projects\MyProject\MyProject.Models\MyProject.edml
I can see the problem. The underlying table has its ID column set to INT32 and is an Identity column so autogenerates the PK.
Can I do this? How do I get around this error?
Thanks.
P.S I am currently mapping my Classes one to one with DB Views(Storage Objects) and this works fine. However I have just realised I should not need to set up DB Views as well since this is just another layer of mapping.