1. <?php
  2. /*
  3.  * To change this template, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6.  
  7. /**
  8.  * Description of User
  9.  *
  10.  * @author david
  11.  */
  12. class User extends AppModel {
  13.     var $name = 'User';
  14. var $actsAs = array('Containable');
  15.   //  var $hasMany = array();
  16.     var $hasAndBelongsToMany =
  17.         array(
  18.             'Subscription' =>
  19.                 array('className'=>'Subscription',
  20.                     'joinTable' => 'users_subscriptions',
  21.                     'foreignKey'             => 'user_id',
  22.                    'associationForeignKey'  => 'subscription_id',
  23.                     'unique' => true,
  24.                    )
  25.             );
  26.  
  27.  
  28. }
  29. ?>