Ok, then try something like this:

Criteria crit = new Criteria();
crit.addEqualTo( "<ref To Adressen_adressart_typ>.<ref To 
Adressartandtyp>.addressart", new Integer( 1 ) );

QueryByCriteria query = new QueryByCriteria( Adressen.class, crit, true );

PersistenceBroker pb = null;
try {
  pb = PersistenceBrokerFactory.defaultPersistenceBroker();

  Collection results = pb.getCollectionByQuery( query );

  // The Collection now contains instances of class Adressen

} catch ( Exception e ) {
  // Do exception handling
} finally {
  if ( pb != null ) {
     pb.close();
  }
}


Danilo Tommasina wrote:

Thanks a lot for your help.

With the PersistenceBroker API you can use a ReportQueryByCriteria

O.K., but we want as result a collection with 'Address' objects. The 'name' attribute is an exampel only. Sorry, my question was not clear enough. We don't know the right mapping and how to build the 'Criteria' object.


regards

Thomas



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to