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

Need a better understanding on inheritance for PKey

1 Answer 30 Views
Getting Started
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jack
Top achievements
Rank 1
Jack asked on 25 Mar 2011, 07:18 PM
I would like to setup a master IEntity type object with my pkey and some audit columns.  I always use Oracle sequences for my pseudo keys but I do follow a strict naming convention of table_name_id number.

Can I create a single entity to inherit from with a generic id (That is of type int32 not int64) but have it map/rename to an object specific property name?

ie) Id in Parent ==> ProgamId in Program entity?

thanks

jack

1 Answer, 1 is accepted

Sort by
0
Zoran
Telerik team
answered on 31 Mar 2011, 08:16 AM
Hi Jack,

 No, it is not possible to have a property defined at base entity, but have the primary key property renamed at the deriving entities. It is possible to define the PK property at a base entity or an interface, however the property that the derived classes will see will be will of course have the same name a sit is in the base class, the behavior is very similar or the same as it is in C# or VB .NET programming languages.

Kind regards,
Zoran
the Telerik team
Tags
Getting Started
Asked by
Jack
Top achievements
Rank 1
Answers by
Zoran
Telerik team
Share this question
or