You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Jin Bal <ji...@hotmail.com> on 2004/03/11 08:56:56 UTC

PB QueryByCriteria Help

Hello,

I have two objects mapped to tables:

Vehicle {
id
manufacturerId
ManufacturerObj
...
}

and 

Manufacturer {
id
name
...
}

The repository has these mapped in a vanilla 1:1 fashion - so nothing too complex there just standard repository mapping (ommitted for clarity)

What I need to do is:

obtain a  list of distinct Manufacturer objects based only on those manufacturerId's that exist in the vehicle table.

How can this be done/what's the best way???  - i think i need to use a ReportQueryByCriteria but I'm not sure of the correct usage as the online docs are a little scant.

Thanks in advance

Jin