One last question, I was trying to update another query using the same
method of identifying the wanted columns when trying to fetch from a
different ObjectEntity than the one from the ObjectSelect. The issue seems
to be that the column I'm selecting is the pk column of another
ObjectEntity? The query I'm doing looks something like this.
ObjectSelect.query(ObjectEntityA.class).columns(ObjEntityA.PROP_FOR_OBJECT_B.dot(ObjEntityB.PROP_FOR_OBJECT_C.dot(ObjEntityC.PROP_FOR_OBJECT_D.dot(ObjEntityD.ENTITY_D_PK_PROP).count()))).where(ObjEntityA.PROP_FOR_OBJECT_E.dot(ObjEntityE.PROP).eq(someValue)).select(context).
However this returns an error that says "Can't translate dbid path
'dbEntityB.dbEntityDPKAttribute', no such pk ''. I know cayenne
usually doesn't include pk property's however we use cgen to generate the
java classes and have the flag createPKProperties set to true so the
properties get generated. Could this be a part of the issue or am I doing
the query wrong?

Reply via email to