Changeset 441 for trunk/app/models

Show
Ignore:
Timestamp:
04/29/08 17:56:48 (8 months ago)
Author:
aarkerio
Message:

Treasure hunts

Location:
trunk/app/models
Files:
1 added
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/models/treasure.php

    r438 r441  
    1212   public $belongsTo = 'User'; 
    1313    
    14     public $hasAndBelongsToMany = array('Vclassroom' => 
     14  public $hasMany = array( 
     15                  'ResultTreasure' => 
     16                           array('className'     => 'ResultTreasure', 
     17                         'conditions'    => null, 
     18                     'foreignKey'    => 'treasure_id' 
     19                         ) 
     20                               ); 
     21 
     22   public $hasAndBelongsToMany = array('Vclassroom' => 
    1523                       array('className'             => 'Vclassroom', 
    1624                         'joinTable'             => 'treasures_vclassrooms', 
  • trunk/app/models/vclassroom.php

    r388 r441  
    6464                         'finderQuery'           => '', 
    6565                         'deleteQuery'           => '' 
     66                         ), 
     67                                        'Treasure' => 
     68                       array('className'             => 'Treasure', 
     69                         'joinTable'             => 'treasures_vclassrooms', 
     70                         'foreignKey'            => 'vclassroom_id', 
     71                         'associationForeignKey' => 'treasure_id', 
     72                         'conditions'            => '', 
     73                         'order'                 => '', 
     74                         'limit'                 => '', 
     75                         'unique'                => true, 
     76                         'finderQuery'           => '', 
     77                         'deleteQuery'           => '' 
    6678                         ) 
    6779                       );