I've got a very simple model which I'm trying to design. As part of it, I want to have a PostalLocation base entity which contains the fields:
Now, I want to have any other models which include postal data to inherit from this class. For example, a CustomerSite entity.
This seems pretty straightforward, following this guide. I've created the CustomerSite entity and removed its automatically-generated Id column. Then I've added the inheritance via the toolbox and set the inheritance strategy to Vertical.
So far, so good. No warnings in Visual Studio's list. So, I go ahead and choose to update the database from the model. I start with an empty database and run the script which OpenAccess generates.
That's where the problem starts. Now, VS reports this warning:
Warning 1 The column with name 'Id' is not mapped to a property. C:\Users\Chris\Documents\Visual Studio 2012\Projects\OATest\OATest.DAL\EntitiesModel.rlinq 0 0
It seems that the script has generated an Id column in the database for my derived entity, which according to the docs I shouldn't have.
Unfortunately, this error prevents me from creating the service via the Add OpenAccess Service menu option (the entities aren't checkable in the list in the wizard).
If I double-click the warning in VS's list and let the error be automatically fixed (by adding the Id property to the derived entity), I then get errors stating that there should not be identity members on a vertically inherited class.
What am I doing wrong here?!
(I'm using VS2012, latest available version of OpenAccess)
Any help greatly appreciated,