Danilo Tommasina wrote:


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();
  }
}
First I don't understand how I can use a collection-descriptor as a reference in my statement. Now I got it. Thanx for help.

<collection-descriptor
         name="roles"
         element-class-ref="org.apache.ojb.broker.Role"
      >
         <inverse-foreignkey field-ref="person_id"/>
</collection-descriptor>

regards

Thomas

--
Mit freundlichen Grüßen

Thomas Franke

Geschäftsführer softEnergy GmbH
----------------------------
The energy for a better world
----------------------------
softEnergy GmbH
Platz der Freundschaft 1
18059 Rostock
----------------------------
fon: +49 381 40 587 535
fax: +49 381 40 587 555
mobil: +49 1715222015

http://www.softenergy.de
mail: [EMAIL PROTECTED]
----------------------------

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



Reply via email to