Remove insertQuery and deleteQuery.

These properties were never implemented and are misleading when people
try to use them.

Closes #3997
This commit is contained in:
mark_story 2013-08-18 21:37:37 -04:00
parent ad5fbd9514
commit 675f828e16
4 changed files with 5 additions and 9 deletions

View file

@ -169,8 +169,6 @@ if (!empty($associations['hasAndBelongsToMany'])):
$out .= "\t\t\t'limit' => '',\n";
$out .= "\t\t\t'offset' => '',\n";
$out .= "\t\t\t'finderQuery' => '',\n";
$out .= "\t\t\t'deleteQuery' => '',\n";
$out .= "\t\t\t'insertQuery' => ''\n";
$out .= "\t\t)";
if ($i + 1 < $habtmCount) {
$out .= ",";

View file

@ -269,7 +269,7 @@ class ContainableBehavior extends ModelBehavior {
* @return array Containments
*/
public function containments(Model $Model, $contain, $containments = array(), $throwErrors = null) {
$options = array('className', 'joinTable', 'with', 'foreignKey', 'associationForeignKey', 'conditions', 'fields', 'order', 'limit', 'offset', 'unique', 'finderQuery', 'deleteQuery', 'insertQuery');
$options = array('className', 'joinTable', 'with', 'foreignKey', 'associationForeignKey', 'conditions', 'fields', 'order', 'limit', 'offset', 'unique', 'finderQuery');
$keep = array();
if ($throwErrors === null) {
$throwErrors = (empty($this->settings[$Model->alias]) ? true : $this->settings[$Model->alias]['notices']);

View file

@ -464,8 +464,8 @@ class Model extends Object implements CakeEventListener {
* - `limit`: The maximum number of associated rows you want returned.
* - `offset`: The number of associated rows to skip over (given the current
* conditions and order) before fetching and associating.
* - `finderQuery`, `deleteQuery`, `insertQuery`: A complete SQL query CakePHP
* can use to fetch, delete, or create new associated model records. This should
* - `finderQuery`, A complete SQL query CakePHP
* can use to fetch associated model records. This should
* be used in situations that require very custom results.
*
* @var array
@ -555,7 +555,7 @@ class Model extends Object implements CakeEventListener {
'belongsTo' => array('className', 'foreignKey', 'conditions', 'fields', 'order', 'counterCache'),
'hasOne' => array('className', 'foreignKey', 'conditions', 'fields', 'order', 'dependent'),
'hasMany' => array('className', 'foreignKey', 'conditions', 'fields', 'order', 'limit', 'offset', 'dependent', 'exclusive', 'finderQuery', 'counterQuery'),
'hasAndBelongsToMany' => array('className', 'joinTable', 'with', 'foreignKey', 'associationForeignKey', 'conditions', 'fields', 'order', 'limit', 'offset', 'unique', 'finderQuery', 'deleteQuery', 'insertQuery')
'hasAndBelongsToMany' => array('className', 'joinTable', 'with', 'foreignKey', 'associationForeignKey', 'conditions', 'fields', 'order', 'limit', 'offset', 'unique', 'finderQuery')
);
/**

View file

@ -1491,7 +1491,7 @@ class ModelIntegrationTest extends BaseModelTest {
'dynamicWith' => true,
'associationForeignKey' => 'join_b_id',
'conditions' => '', 'fields' => '', 'order' => '', 'limit' => '', 'offset' => '',
'finderQuery' => '', 'deleteQuery' => '', 'insertQuery' => ''
'finderQuery' => ''
));
$this->assertEquals($expected, $result);
@ -1568,8 +1568,6 @@ class ModelIntegrationTest extends BaseModelTest {
'offset' => '',
'unique' => true,
'finderQuery' => '',
'deleteQuery' => '',
'insertQuery' => ''
));
$this->assertSame($TestModel->hasAndBelongsToMany, $expected);