Created
July 28, 2008 16:06
-
-
Save kyleslattery/2908 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// show.php | |
class Show extends AppModel { | |
var $hasAndBelongsToMany = array('User'); | |
} | |
// user.php | |
class User extends AppModel { | |
var $hasAndBelongsToMany = array('Show'); | |
} | |
// Trying to add association between existing User and Show records: | |
// $show_id = existing show's id | |
// $user_id = existing user's id | |
$data = array('Show' => array('id' => $show_id), 'User' => array('id' => $user_id)); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment