1 Reply Latest reply on Aug 11, 2005 5:02 AM by Emmanuel Bernard

    How to embedd a class heirarchy into another class?

    Rick Meier Newbie

      I'm wondering how a class can have an attribute that is an object from a class hierarchy and implement it as in an embedded manner in SQL.

      For example, I have a class heirarchy comprised of base class BASE and derived classes DERIVED1 and DERIVED2 which extend BASE. In another class called OTHER, I have a reference to BASE. In SQL I'd like this object model to map to a single table instead of two or more tables which must be joined.

      Is there a way to do this?

      As I understand the @EmbeddableSuperclass annotation it is used where the class OTHER is part of a hierarchy. In my case the class OTHER is referencing a class heirarchy.

      Any help would be much appreciated.