SubSonic Forums
All Your Database Are Belong To Us

Does Subsonic support polymorphic entities and/or inheritance?

Latest post 11-07-2008 4:39 PM by wgpubs. 3 replies.
  • 11-03-2008 5:17 PM

    • wgpubs
    • Not Ranked
    • Joined on 09-29-2008
    • Posts 4

    Does Subsonic support polymorphic entities and/or inheritance?

    I don't see it but maybe I'm missing something.

    In terms of polymorphism, I'm thinking of an example where you may have an interface or base type defined as 'Artifact' ... which entities are specifically defined as 'Document', 'Audio', 'Video' etc....  All these specific entities are artifacts and I'd like the ability to iterate and use them as such.  Is that possible?

    In terms of inheritance, is any form of inheritance supported by subsonic?  The most common form I've seen is single-table inheritance using a discriminator column ... is that supported?

     

    Thanks - wgpubs

  • 11-04-2008 1:11 AM In reply to

    Re: Does Subsonic support polymorphic entities and/or inheritance?

    There is no special support for Inheritance and Polymorphism in SubSonic maybe you should have a look at NHibernate they do support this.

    If I am I because I am I, and You are You because You are You, then I am I, and you are you. But If I am I because You are You, and You are You because I am I, then I am not I and You are not You. -Rabbi of Kotzk

  • 11-07-2008 3:39 AM In reply to

    Re: Does Subsonic support polymorphic entities and/or inheritance?

    Couldn't you combine the use of custom templates and/or partial classes ?

  • 11-07-2008 4:39 PM In reply to

    • wgpubs
    • Not Ranked
    • Joined on 09-29-2008
    • Posts 4

    Re: Does Subsonic support polymorphic entities and/or inheritance?

    Having an ORM capable of implementing simple inheritance and/or polymorphic behavior has nothing to do with templates or partial classes.  Its really a question of whether or not Subsonic supports such concepts as does ActiveRecord in the Rails world.

    - wg

Page 1 of 1 (4 items) | RSS