Re: Subclassing a DataObject

From: Michael Gentry (Yes, I'm a Contractor) ("Michael)
Date: Thu Jun 30 2005 - 15:17:10 EDT

  • Next message: Mike Kienenberger: "Re: Subclassing a DataObject"

    Is there a reason you don't want to put your static variable in the normal
    class (the non-underscore one)? Cayenne wouldn't try to persist that value
    for you since it doesn't know about it.

    > From: Kevin Menard <kmenar..ervprise.com>
    > Reply-To: <cayenne-use..bjectstyle.org>
    > Date: Thu, 30 Jun 2005 15:04:21 -0400
    > To: <cayenne-use..bjectstyle.org>
    > Subject: Subclassing a DataObject
    >
    > Yet another for the experts out there :-)
    >
    > I have a DataObject. I'd like to subclass it for a test class I'm
    > writing. The subclass is quite trivial -- it simply has a static var
    > that it increments so I can encapsulate feeding unique values to the
    > DataObject. So, the subclass really only overrides the DataObject's
    > constructors, passing up some unique values. I guess what it's
    > doing is irrelevant -- it's just sufficient to know it's not mucking
    > with the DB.
    >
    > Cayenne doesn't seem to like trying to commit this DO, since the
    > subclass isn't registered in the mapping file. Is there any way
    > around this, other than restructure my tests? It would seem as
    > though if the subclass were not trying to persist any additional
    > information, that Cayenne should be happy. Or does this all fall
    > under the VI work that Mike has been doing?
    >
    > Thanks,
    > Kevin



    This archive was generated by hypermail 2.0.0 : Thu Jun 30 2005 - 15:17:12 EDT