Page 1 of 1

Inheritance

Posted: Tue 21 Jun 2011 10:32
by blacknorth
while we are creating tables in postgreSQL, we want to use inheritance method, but we deal some errors. What should we do? (Note: We are using linq method)

Posted: Wed 22 Jun 2011 12:44
by StanislavK
Could you please describe the steps you are performing and the errors you are getting in more details? For example, please specify the following:
- whether you are creating tables manually or via the 'Update to Database' wizard;
- the inheritance type you are using (Table per Type, Table per Hierarchy, or the PostgreSQL table inheritance);
- the exact error message you are receiving.

If possible, please send us a model with which the problem can be reproduced.

Posted: Fri 24 Jun 2011 06:37
by blacknorth
Actually, could you describe me which steps I should follow, if I want to use inheritance method while creating tables using postgresql.

Posted: Mon 27 Jun 2011 08:23
by StanislavK
To create an inheritance hierarchy using the Table per Type or Table per Hierarchy approach, you should perform the following:
- create an empty LinqConnect model;
- create the entity classes as described in the corresponding article;
- run the 'Update to Database' wizard to create the tables in the database.

As for the PostgreSQL table inheritance, LinqConnect does not support it at the moment: it is possible to create a separate entity class and a LinqConnect table for each database table, however the entity class generated for the 'child' table would not inherit from the class generated for the 'parent' table.