1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48 |
/**
* test that saving habtm records respects conditions relating to an associated model
* set in the 'conditions' key for the association.
*
* @return void
*/
public function testHabtmSaveWithAssociatedModelConditionsInAssociation() {
$this->loadFixtures('JoinThing', 'Something', 'SomethingElse');
$Something = new Something();
'className' => 'SomethingElse',
'joinTable' => 'join_things',
'unique' => true
),
'className' => 'SomethingElse',
'joinTable' => 'join_things',
'unique' => true
)
)
), false);
$result = $Something->read(null, 1);
)
)
);
$Something->create($data);
$result = $Something->save();
$result = $Something->read(null, 1);
} |
