Skip to content
Permalink
Browse files

Remove insertQuery and deleteQuery.

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

Closes #3997
  • Loading branch information...
markstory committed Aug 19, 2013
1 parent ad5fbd9 commit 675f828e163b069a60e69ae11734d4b835e88513
@@ -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 .= ",";
@@ -269,7 +269,7 @@ public function resetBindings(Model $Model) {
* @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']);
@@ -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')
);
/**
@@ -1491,7 +1491,7 @@ public function testAutoConstructAssociations() {
'dynamicWith' => true,
'associationForeignKey' => 'join_b_id',
'conditions' => '', 'fields' => '', 'order' => '', 'limit' => '', 'offset' => '',
'finderQuery' => '', 'deleteQuery' => '', 'insertQuery' => ''
'finderQuery' => ''
));
$this->assertEquals($expected, $result);
@@ -1568,8 +1568,6 @@ public function testAutoConstructAssociations() {
'offset' => '',
'unique' => true,
'finderQuery' => '',
'deleteQuery' => '',
'insertQuery' => ''
));
$this->assertSame($TestModel->hasAndBelongsToMany, $expected);

0 comments on commit 675f828

Please sign in to comment.
You can’t perform that action at this time.