8 Jun 2012 00:07
Cayenne 3.0.2 rop and reflection.
Emanuele Maiarelli <emanuele <at> mengozzi.com>
2012-06-07 22:07:42 GMT
2012-06-07 22:07:42 GMT
I'm trying to move an application built around cayenne 2.0.4 to
3.0.2 and im facing an odd problem.
I've some objects with 1 to n
relation, that calls to a generic method getTo...() via reflection, that
returns null, even if the underlaying database holds the correct
reference.
So i tested the object calling the method without
reflection it works correcty.
For instance:
In this case
ObjectContext newct=this.instance.getFreshContex(); // this methods
returns new CayenneContext(channel);
SelectQuery sq=new
SelectQuery(Dochdrs.class);
List dd=newct.performQuery(sq);
this.instance.setupPrefetch(sq, Dochdrs.class,newct, 1);
for (Dochdrs
doc:dd)
{
System.out.println(doc.getToCentrocosti().getCcDesc());
}
(Continue reading)
RSS Feed