One thing you can try is to use recursive option. Set recursive
variable to 1 in you Application model. So your model will look like
this.
class Application extends AppModel
   {
      var $name      = 'Application'; // required for php4 installs

   /* use recursive to find all offers related to a particular
application
      var $recursive = 1;

      var $hasMany   = array(
                             'Offer' =>
                          array('className'   => 'Offer',
                                'conditions'  => '',
                                'order'       => 'Offer.created ASC',
                                'limit'       => '',
                                'foreignKey'  => 'Application_id',
                                'dependent'   => true,
                                'exclusive'   => true,
                                'finderSql'   => '')
                        );
  }

   class Offer extends AppModel
   {
      var $name      = 'Offer'; // required for php4 installs
      var $belongsTo = array('Application' =>
                                 array('className'  => 'Application',
                                       'conditions' => '',
                                       'order'      => '',
                                       'foreignKey' =>
'application_id'));
   }


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to