Re: superclass template question

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed May 11 2005 - 11:13:07 EDT

  • Next message: Cris Daniluk: "Re: superclass template question"

    On May 11, 2005, at 11:07 AM, Mike Kienenberger wrote:
    >> Second - how can I get the package name of User when generating
    >> _User? I have superclasses generated into a separate package than
    >> the subclass objects (which I create manually).

    I guess the easiest way is to use fully qualified class name you get
    from ObjEntity. This is generated code, so it shouldn't be a big deal.

    > I think it's a bad idea to have your superclass directly refer to the
    > subclass. I also don't think that information is available.
    > What task are you trying to accomplish?

    I disagree... We are talking about generated code. The information
    comes from ObjEntity. So you may think of it as referring to an entity
    mapped class (that coincidentally happens to be a subclass of a
    generated class). Actually superclass "knows" about subclasses of
    related objects already (when building relationships accessors), so I
    don't see a problem with this approach.

    Andrus



    This archive was generated by hypermail 2.0.0 : Wed May 11 2005 - 11:13:10 EDT