Is it ok?

<?php

class Pais extends AppModel {
    var $name = 'Pais';
                  
    var $displayField = "nombre";
    
    var $belongsTo = array( 'Provincia' => array( 'className' => 'Provincia' 
) );
     
    var $validate = array(
     'nombre' => array('rule' => 'notEmpty')
);
}

?>


<?php

class Provincia extends AppModel {
    var $name = 'Provincia';
     
    var $displayField = "nombre";

    var $hasMany = array( 'Pais' => array( 'className' => 'Pais' ) );
        
    var $validate = array(
'nombre' => array('rule' => 'notEmpty')
);

}

?>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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