Inheritance
-
- Posts: 2
- Joined: Tue 21 Jun 2011 10:21
Inheritance
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)
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
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.
- 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.
-
- Posts: 2
- Joined: Tue 21 Jun 2011 10:21
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
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.
- 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.