Posted By

squarepegsys on 10/18/09


Tagged

cakephp


Versions (?)

hasOne version 1


 / Published in: PHP
 

This works fine, except that it repeats a lot of code

  1. class Call extends AppModel {
  2. var $name = 'Call';
  3.  
  4. var $hasOne=array(
  5. "base_region"=> array("className"=>"Region",
  6. "foreignKey"=>"id",
  7. "column"=>"id"),
  8.  
  9.  
  10. "region_1"=> array("className"=>"Region",
  11. "foreignKey"=>"id",
  12. "column"=>"id")
  13. );
  14.  
  15. }

Report this snippet  

You need to login to post a comment.