Re: Subclassing a DataObject

From: Mike Kienenberger (mkienen..laska.net)
Date: Thu Jun 30 2005 - 15:22:35 EDT

  • Next message: Mike Kienenberger: "Re: Empty Constructor"

    Kevin Menard <kmenar..ervprise.com> wrote:
    > 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?

    No, I don't think my VI work has any relevance.

    My guess is that it's not possible to mess with your subclass inside
    cayenne(committing it) unless the subclass is registered in a map.

    What about creating another DataMap that defines your subclass? Maybe as a
    single-table-inheritance child of the original? Not sure if
    single-table-inheritance is the right away to get around this problem.
    Having a separate map would at least let you keep your testing datamap
    separate.

    There's probably a better way to solve your testing problem, but I don't
    have enough info (either that, or enough brain cells) to provide any ideas.



    This archive was generated by hypermail 2.0.0 : Thu Jun 30 2005 - 15:19:48 EDT