hasOne version 1


/ Published in: PHP
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.