Need a better understanding on inheritance for PKey

2 posts, 0 answers
  1. Jack
    Jack avatar
    45 posts
    Member since:
    Feb 2009

    Posted 25 Mar 2011 Link to this post

    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?


  2. Zoran
    Zoran avatar
    534 posts

    Posted 31 Mar 2011 Link to this post

    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,
    the Telerik team
  3. DevCraft banner
Back to Top