cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Garcia Corral, Josep" <>
Subject getArray matching specific criteria?
Date Wed, 28 May 2008 13:45:53 GMT

Having this:

Class Master {
            int id;

Class Detail {
            int id_master;
            String data;

I cannot figure out how to perform a SelectQuery to obtain detail records matching a condition,
equivalent to a pseudocode SQL sentence like this:

Select Detail.* from Detail, Master where Detail.id_master = myMasterInstance_id and data
= other_value;

In pseudocode Java, I would like to have:

Master myMaster;
List<Detail> list = myMaster.getDetailArray( data field matching specific criteria);

Is it a good practice to do it via SelectQuery, or is it better to do this via SQLTemplate?


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