Skip to content

$association['foreignKey'] === false not supported #1

Description

@korcan

Linkable does not support defining an alternative join not using the primary key. Linkable should allow setting foreign key to false to alternatively define the relationship, see below:
(http://stackoverflow.com/questions/3814862/cakephp-model-relation)
public $hasOne = array(
'RelatedModel' => array(
'className' => 'RelatedModel',
'foreignKey' => false,
'conditions' => array(
'MainModel.random_field = RelatedModel.some_field'
)
)
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions