Return to Snippet

Revision: 19231
at October 18, 2009 14:58 by squarepegsys


Initial Code
class Call extends AppModel {
    var $name = 'Call';
 
    var $hasOne=array(
      "base_region"=> array("className"=>"Region",
	    		    "foreignKey"=>"id",
			    "column"=>"id"),
			
			
    "region_1"=>  array("className"=>"Region",
			"foreignKey"=>"id",
			"column"=>"id")
);

}

Initial URL

                                

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

Initial Title
hasOne version 1

Initial Tags
cakephp

Initial Language
PHP