This is a migrated thread and some comments may be shown as answers.

Cant get horizontal inheritance working

1 Answer 58 Views
Design Time (Visual Designer & Tools)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alex
Top achievements
Rank 1
Alex asked on 12 Aug 2010, 10:53 AM
I'm trying to build my first openaccess orm application. I have downloaded and installed latest version of ORM Express.
Then I have created new solution in Visual Studio 2010, and created class library project.

I then added domain model, pointing to "empty" SQL 2008 EXPRESS database.

In visual designer, I've added class called BaseEntity with just one property (ID: Int32)
And then added class called User with properties (Username:string, Password: string, Email: string)
I have added Inheritance between these 2 classes. Then selected BaseEntity class and specified Horizontal inheritance strategy in Inheritance mapping window. When I trying to save my model, it give me different errors:

1. If I set Identity to true for BaseEntity class, ID property, it give me error that horizontal base class cant have identity
2. The only way I can add identity to my User class, by adding new property ID to User class, which hides base ID property. This resolved all errors, but when I generate script using Update Database from Model, table User contains 2 ID properties, which is wrong.

Can you please explain correct way to use horizontal inheritance. Is it possible in OpenAccess to define base class for all entities with ID property?

Thanks

1 Answer, 1 is accepted

Sort by
0
Zoran
Telerik team
answered on 13 Aug 2010, 01:53 PM
Hi Alex,

 At its current status, the Visual Designer only supports vertical and flat inheritance. Horizontal will be supported by the Q3 2010 release. I suggest you to have a look into the following blog post series that discuss inheritance in OpenAccess domain model.

Best wishes,
Zoran
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Design Time (Visual Designer & Tools)
Asked by
Alex
Top achievements
Rank 1
Answers by
Zoran
Telerik team
Share this question
or