By association, I assume you mean the Alias? I will give that a try.
Thank you very much for the tip. In fact, I do have several
associations with the same aliases since I thought that was what I
should do. The aliases are the same on both sides of a belongs to,
hasmany relationship. In other words, using my quoted example from
above, the ObjectCondition class has a complementary
ObjectConditionCurrent hasmany relation in it. So I will change the
names in the above code. Once I iron this out, I think I'll add a note
to the docs since there currently is no mention of this there.

Sorry for the total Noob question everyone. I come from a PHP
background with a lot of Drupal experience. Am at the beginning of a
project where Drupal's base install was going to be too difficult to
shoe-horn in. Seemed like a good time to pick up an actual framework
like CakePHP and after a long search, this is where I landed. I'm
really impressed and just like I contributed nearly a dozen modules to
the Drupal community, I plan on contributing back to this one as well.

Also, sorry everybody for the double post. I assume now that as a new
user I had to be cleared by a moderator. There wasn't mention of that
when I signed up, so I thought my first post didn't go through.

Anyway, I'll be seeing all of you around. Thanks again for the quick
response.

On Jul 20, 9:41 pm, KingJackaL <[EMAIL PROTECTED]> wrote:
> Make sure you don't have 2 different associations with the same name.
> For example - does any other Model have a 'Lend' association or
> whatever that clashes? (this situation causes a WSoD)
>
> See for more 
> detail:http://groups.google.com/group/cake-php/browse_thread/thread/9a3c4d8d...
>
> On Jul 20, 1:54 pm, Ryan <[EMAIL PROTECTED]> wrote:
>
> > As soon as I add this, it craps everything else out that I've done -
> > i.e white screens everywhere. Any ideas?
>
> > <?php
> > class TheObject extends AppModel {
>
> >         var $name = 'TheObject';
> >         var $validate = array(
> >                 'rid_reason_id' => array('numeric'),
> >                 'user_id' => array('numeric'),
> >                 'object_condition_current_id' => array('numeric'),
> >                 'object_condition_purchase_id' => array('numeric'),
> >                 'object_type_id' => array('numeric'),
> >                 'price_paid' => array('money'),
> >                 'type_id_num' => array('numeric'),
> >                 'rid' => array('boolean'),
> >                 'share' => array('boolean')
> >         );
>
> >         //The Associations below have been created with all possible keys,
> > those that are not needed can be removed
> >         var $belongsTo = array(
> >                         'RidReason' => array('className' => 'RidReason',
> >                                                                 
> > 'foreignKey' => 'rid_reason_id',
> >                                                                 
> > 'conditions' => '',
> >                                                                 'fields' => 
> > '',
> >                                                                 'order' => 
> > ''
> >                         ),
> >                         'User' => array('className' => 'User',
> >                                                                 
> > 'foreignKey' => 'user_id',
> >                                                                 
> > 'conditions' => '',
> >                                                                 'fields' => 
> > '',
> >                                                                 'order' => 
> > ''
> >                         ),
> >                         'ObjectConditionCurrent' => array('className' => 
> > 'ObjectCondition',
> >                                                                 
> > 'foreignKey' => 'object_condition_current_id',
> >                                                                 
> > 'conditions' => '',
> >                                                                 'fields' => 
> > '',
> >                                                                 'order' => 
> > ''
> >                         ),
> >                         'ObjectConditionPurchase' => array('className' =>
> > 'ObjectCondition',
> >                                                                 
> > 'foreignKey' => 'object_condition_purchase_id',
> >                                                                 
> > 'conditions' => '',
> >                                                                 'fields' => 
> > '',
> >                                                                 'order' => 
> > ''
> >                         ),
> >                         'ObjectType' => array('className' => 'ObjectType',
> >                                                                 
> > 'foreignKey' => 'object_type_id',
> >                                                                 
> > 'conditions' => '',
> >                                                                 'fields' => 
> > '',
> >                                                                 'order' => 
> > ''
> >                         )
> >         );
>
> >         var $hasMany = array(
> >                         'Lend' => array('className' => 'Lend',
> >                                                                 
> > 'foreignKey' => 'the_object_id',
> >                                                                 'dependent' 
> > => false,
> >                                                                 
> > 'conditions' => '',
> >                                                                 'fields' => 
> > '',
> >                                                                 'order' => 
> > '',
> >                                                                 'limit' => 
> > '',
> >                                                                 'offset' => 
> > '',
> >                                                                 'exclusive' 
> > => '',
> >                                                                 
> > 'finderQuery' => '',
> >                                                                 
> > 'counterQuery' => ''
> >                         )
> >         );
>
> > }
>
> > ?>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to