Hi Andrew,
Cool! IMO Cayenne model metadata is generally underused, as most developers
(myself included) are focusing on the ORM aspect of the framework, and ignore
the possibilities that an easily-accessible model brings to the table. So
thanks for the example.
Andrus
> On Feb 7, 2024, at 3:
I just realized that my issue had to do with my parenthesis, Your solution
worked. Thank you so much for the help.
On Wed, Feb 7, 2024 at 11:22 AM Jurgen Doll wrote:
> Try the following version and see if it works for you:
>
> ObjectSelect.query( ObjectEntityA.class )
> .columns(
>
Hello;
Possibly of interest; I recently needed to update an ERD and decided to try
scripting it's production from a Cayenne data model file [1] using the
open-source Graphor application.
[1] http://www.lindesay.co.nz/blog/2024/2024-hds-model-to-graphor/
Regards.
--
Andrew Lindesay
Try the following version and see if it works for you:
ObjectSelect.query( ObjectEntityA.class )
.columns(
ObjEntityA.PROP_FOR_OBJECT_B
.dot( ObjEntityB.PROP_FOR_OBJECT_C )
.dot( ObjEntityC.PROP_FOR_OBJECT_D )
.count()
)
.where(
ObjEntityA.
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 qu