Skip to content

Instantly share code, notes, and snippets.

@TiuTalk
Created December 16, 2011 21:38
Show Gist options
  • Save TiuTalk/1488116 to your computer and use it in GitHub Desktop.
Save TiuTalk/1488116 to your computer and use it in GitHub Desktop.
<?php
class Category extends AppModel {
public $hasOne = array(
'MainPost' => array(
'className' => 'Post',
'foreignKey' => 'mainpost_id'
)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment