The database I have to work with has defined primary keys on virtually every table, but ideally I would like to implement some inheritance at the object layer. e.g. The database defines an asset with a primary key, a contract which is an asset has it's own primary key and a clientContract which is an contract has it's own primary key.
Asset
assetId(PK)
Contract
contractId(PK)
assetId - join key
ClientContract
clientContractId(PK)
contractId - join key
I can create an inheritance mapping via a subclass(join) in V3.0 on assetId and that all works. Unfortunately I cannot then subclass ClientContract, a class gets created but no values are populated, I assume this is because contractId is not available for the join. Is there anyway round this or would I need to get the data model changed.
Thanks,
John
|