Builds a string containing an SQL statement template.
public generateAssociationQuery ( Model $Model, Model | null $LinkModel, string $type, string $association, array $assocData, &$queryData, boolean $external ) : mixed | ||
$Model | Model | Primary Model object. |
$LinkModel | Model | null | Linked model object. |
$type | string | Association type, one of the model association types ie. hasMany. |
$association | string | Association name. |
$assocData | array | Association data. |
$external | boolean | Whether or not the association query is on an external datasource. |
return | mixed | String representing a query. True, when $external is false and association $type is 'hasOne' or 'belongsTo'. |