I'm not sure why, but expected models related by belongsTo and hasMany
to be "autovalidated".

e.g.

class Team extends AppModel  {
  var $hasMany = array(
         'Player' => array(  'Player' => 'Item' , 'foreignKey' =>
'team_id'  )
 );
}

class Player extends AppModel {
  var $belongsTo = array(
          'Team' => array( 'className' => 'Team' , 'foreignKey' =>
'team_id' )
 );
}

---
I thought for sure that an invalid team_id would be automatically
validated, but this does not seem to be the case.

Question : Is there a built in rule that will validate the team_id
when I insert a new Player record ?  Or do I have to roll my own
solution to this ?

Thanks,
Roger

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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