Skip to content

Instantly share code, notes, and snippets.

@slywalker
Created March 6, 2010 07:08
Show Gist options
  • Save slywalker/323561 to your computer and use it in GitHub Desktop.
Save slywalker/323561 to your computer and use it in GitHub Desktop.
<?php
class User extends AppModel {
var $name = 'User';
var $validate = array(
'username' => array('notempty'),
'password' => array('notempty')
);
//The Associations below have been created with all possible keys, those that are not needed can be removed
var $hasMany = array(
'Post' => array(
'className' => 'Post',
'foreignKey' => 'user_id',
'dependent' => false,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
)
);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment