Mixing Table Per Type and Table Per Hierarchy Inheritance

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
ruionwriting
Posts: 10
Joined: Fri 11 Feb 2011 11:35
Location: PT

Mixing Table Per Type and Table Per Hierarchy Inheritance

Post by ruionwriting » Wed 04 May 2011 16:17

How to perform something similar to http://www.insidercoding.com/post/2010/ ... tance.aspx?

Here my scenario:

- I have a provider model were I have a base class Provider (contains all common properties). Maps to one table on the Db;

- Then I have 4 providers: Domains, Payments, Dns and Certificates. Earch maps to one table with the particular properties for each context;

I've tried several ways, also reading the supplied article, and I can't get the model to validate properly.

Is it possible to do this?

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Thu 05 May 2011 13:24

I'll send you a sample project in a letter, please check that it was not blocked by your mail filter.

The mentioned walkthrough apparently misses the last point: since the base type is abstract, and the derived types have no key fields, it is necessary to set mapping for the ProductId column of the Product table in each of the derived entity classes.

Please tell us if this helps.

ruionwriting
Posts: 10
Joined: Fri 11 Feb 2011 11:35
Location: PT

Post by ruionwriting » Thu 05 May 2011 13:40

Hi have the email. I'm going to do some tests.

Post Reply