Yes, this is related to that previous ticket, but a 'new' thing I'm trying to do (I didn't put the full details in because I thought what I'd put was enough, sorry about that).
I've followed what you said, and made the db-ref point to the superclass field explicitly, ie:
[Please can you update the documentation to say that this is how to reference a superclass field.]
With that in place, I no longer get the MetadataException, but when trying to load an instance of the referencing class (Country in this test example), I get a SQLException (other fields removed from query to keep it simple):
Telerik.OpenAccess.Exceptions.DataStoreException : Error executing query: Telerik.OpenAccess.RT.sql.SQLException: Invalid column name 'CountryID2'.
Statement(s) could not be prepared.
SELECT a.[CountryID] AS COL1, a.[LockVersion] AS COL2, a.[CountryID2] AS COL3, a.[LockVersion] AS COL4, ... FROM [Country] a WHERE a.[ThreeLetterCode] = ?
I think the problem is that the CountryID database column is both the primary key of the Country class and part of the compound key referencing Country_Audit. Checking the documentation, I now see that on the Mapping Fields to the same Columns page it says:
"Using a reference in the primary key is not supported in the current release of OpenAccess."
Is that the limitation I'm hitting here? (I thought I was using a primary key as part of a reference, so didn't think that applied, but I now suspect I've misunderstood.)
Assuming that is the case, I'm raise a support ticket to see what options there are to get around this.
Best regards, Peter