回答編集履歴
1
推敲
test
CHANGED
@@ -6,23 +6,37 @@
|
|
6
6
|
|
7
7
|
```PHP
|
8
8
|
|
9
|
+
<?php
|
10
|
+
|
9
11
|
App::uses('AppModel', 'Model');
|
10
12
|
|
11
13
|
|
12
14
|
|
13
15
|
class Post extends AppModel {
|
14
16
|
|
15
|
-
public $actsAs = array('Search.Searchable');
|
17
|
+
public $actsAs = array('Search.Searchable');
|
16
18
|
|
17
19
|
|
18
20
|
|
19
|
-
public $
|
21
|
+
public $hasMany = array( 'PostsTag' => array( 'className' => 'PostsTags'
|
20
22
|
|
21
|
-
, '
|
23
|
+
, 'foreignKey' => 'post_id'
|
22
24
|
|
23
|
-
|
25
|
+
, 'conditions' => ''
|
24
26
|
|
27
|
+
, 'fields' => ''
|
28
|
+
|
29
|
+
, 'order' => ''));
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
public $filterArgs = array( array( 'name' => 'id'
|
34
|
+
|
35
|
+
, 'type' => 'value')
|
36
|
+
|
37
|
+
, array( 'name' => 'title'
|
38
|
+
|
25
|
-
, 'type' => 'like')
|
39
|
+
, 'type' => 'like')
|
26
40
|
|
27
41
|
, array( 'name' => 'tag_id'
|
28
42
|
|
@@ -34,27 +48,17 @@
|
|
34
48
|
|
35
49
|
|
36
50
|
|
37
|
-
public $presetVars = array( array( 'field' => 'id'
|
51
|
+
public $presetVars = array( array( 'field' => 'id'
|
38
52
|
|
39
|
-
, 'type' => 'value')
|
53
|
+
, 'type' => 'value')
|
40
54
|
|
41
|
-
, array( 'field' => 'title'
|
55
|
+
, array( 'field' => 'title'
|
42
56
|
|
43
|
-
, 'type' => 'value')
|
57
|
+
, 'type' => 'value')
|
44
58
|
|
45
|
-
, array( 'field' => 'tag_id'
|
59
|
+
, array( 'field' => 'tag_id'
|
46
60
|
|
47
|
-
, 'type' => 'value'));
|
61
|
+
, 'type' => 'value'));
|
48
|
-
|
49
|
-
public $hasMany = array( 'PostsTag' => array( 'className' => 'PostsTags'
|
50
|
-
|
51
|
-
, 'foreignKey' => 'post_id'
|
52
|
-
|
53
|
-
, 'conditions' => ''
|
54
|
-
|
55
|
-
, 'fields' => ''
|
56
|
-
|
57
|
-
, 'order' => ''));
|
58
62
|
|
59
63
|
|
60
64
|
|