<commit_before><?php

App::uses('ModelBehavior', 'Model');

class LinkedAssetsBehavior extends ModelBehavior {

	public function setup(Model $model, $config = array()) {
		$model->bindModel(array(
			'hasMany' => array(
				'AssetsAssetUsage' => array(
					'className' => 'Assets.AssetsAssetUsage',
					'foreignKey' => 'foreign_key',
					'dependent' => true,
					'conditions' => array(<commit_msg>Quick hack to make it work with hasOne relationship<commit_after><?php

App::uses('ModelBehavior', 'Model');

class LinkedAssetsBehavior extends ModelBehavior {

	public function setup(Model $model, $config = array()) {
		$config = Hash::merge(array(
			'key' => 'LinkedAsset',
		), $config);
		$this->settings[$model->alias] = $config;

		$model->bindModel(array(
			'hasMany' => array(
				'AssetsAssetUsage' => array(
					'className' => 'Assets.AssetsAssetUsage',
					'foreignKey' => 'foreign_key',
					'dependent' => true,
					'conditions' => array(
{'fraction_non_alphanumeric': 0.16597077244258873, 'fraction_numerical': 0.0, 'mean_word_length': 4.641176470588236, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1674534', 'n_tokens_mistral': 350, 'n_tokens_neox': 294, 'n_words': 66}