I have HotelService and HotelServiceDescription linked by 1:n relation.
I execute the following code and get the HotelService deleted from db, but
only one HotelServiceDescription (I have 2 linked with that service).

       Enumeration result = (Enumeration)oql.execute();
       if(result.hasMoreElements()) {
         service = (HotelService)result.nextElement();
         Iterator iter = service.getHotelServiceDescription().iterator();
         while(iter.hasNext()) {
           HotelServiceDescription desc =
(HotelServiceDescription)iter.next();
           service.removeHotelServiceDescription(desc);
//           desc.setHotelService(null);
           db.remove(desc);
         }
          db.remove(service);
       }

I have no problem with select, update and create.
Any hint?
Thx
Francesco

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to