cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrey Razumovsky <razumovsky.and...@gmail.com>
Subject Re: Nested ROP contexts and relationships
Date Tue, 24 Nov 2009 11:37:11 GMT
2009/11/24 Andrus Adamchik <andrus@objectstyle.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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message