Re: Nested ROP contexts and relationships

From: Andrey Razumovsky (razumovsky.andre..mail.com)
Date: Tue Nov 24 2009 - 06:37:11 EST

  • Next message: Robert Zeigler: "Re: Nested ROP contexts and relationships"

    2009/11/24 Andrus Adamchik <andru..bjectstyle.org>

    >
    > I did not, but I defined 3 different types of objects (ROP, POJO, JPA) that
    > don't use this approach for setting reverse relationship. So that's what I
    > mean by pluggable :-)
    >
    >
    And now I want at least ROP-like classes do use this approach as well (i
    mean what is contained inside "setToOneTarget" method). I just want to
    minimize duplicating the code. Alternatively, same code will be added to the
    places where we process those "different types".

    >
    > Property p = ClassDescriptor.getProperty(String);
    > p.readProperty(Object);
    > p.readPropertyDirectly(Object);
    >
    >
    ...and more lines to get ClassDescriptor:

    ClassDescriptor cd = object.getObjectContext().

    getEntityResolver().getClassDescriptor(object.getObjectId().getEntityName());
    Too hard for user who does not know Cayenne internals I think



    This archive was generated by hypermail 2.0.0 : Tue Nov 24 2009 - 06:38:26 EST