Re: Opinion on using DO class as entity id!?

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu Jan 30 2003 - 10:30:55 EST

  • Next message: Andriy Shapochka: "Re: Opinion on using DO class as entity id!?"

    Is it possible for you to use java.lang.reflect.Proxy for this purpose:

      http://java.sun.com/j2se/1.3/docs/api/java/lang/reflect/Proxy.html

    So far I couldn't find a single justified use of the Java Proxy feature,
    but maybe this is just it? :-)

    Andrus

    > It is probably too late to say this, but in my opinion introducing
    > DataObject classes as new ObjEntity identifiers instead of ObjEntity
    > names in EntityResolver negatively affected Cayenne flexibility and
    > usability. Before this replacement it had been possible to create
    > ObjEntities at the runtime backing them up with CayenneDataObject as an
    > actual data object class. Its implementation allows this, of course. And
    > as a matter of fact it is the most significant quality of map based
    > implementations to be runtime configurable. In particular my regression
    > application relied on this default implementation, schemas being
    > generated randomly with changing DbEntities and ObjEntities at the
    > runtime. In this case I will have to generate and compile Java classes
    > for each test automatically, which is a little bit ugly but, at least,
    > acceptable in a test environment. But think now - very often one has no
    > such a luxury like in EJB containers and such. Also, any possibility of
    > decent usage of dynamic proxies for DataObject implementations is
    > eliminated now.
    >
    > If I am making a mistake and there is some back door left one can gain
    > access to these features through would anybody please give a hint how to
    > define the same data object class for several different ObjEntities in a
    > data map. Thanks a lot.
    >
    > Andriy.



    This archive was generated by hypermail 2.0.0 : Thu Jan 30 2003 - 10:30:55 EST