Skip to content

Instantly share code, notes, and snippets.

@cesarockstar1985
Created April 25, 2023 16:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cesarockstar1985/52be72f1d9d563de82b6310d0f7a4a1d to your computer and use it in GitHub Desktop.
Save cesarockstar1985/52be72f1d9d563de82b6310d0f7a4a1d to your computer and use it in GitHub Desktop.
$this->hasMany('Todos', [
'foreignKey' => 'foreign_key',
'className' => 'CakeDC/Todo.Todos',
'conditions' => [
'model' => 'Bonds',
],
]);
$this->hasOne('FollowUps', [
'foreignKey' => 'bond_id',
'joinType' => 'LEFT',
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment