author | Florent Cayré <florent.cayre@gmail.com> |
Tue, 27 Sep 2011 18:46:36 +0200 | |
changeset 7875 | 65e460690139 |
parent 7859 | 15809afe093b |
child 7878 | dcdccb495e78 |
permissions | -rw-r--r-- |
7827
9bbf83f68bcc
[entity] upgrade fetch_[unrelated_]order to benefit from changes introduced in 3.14 (closes #1942758)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
1 |
API changes in cubicweb 3.14 |
9bbf83f68bcc
[entity] upgrade fetch_[unrelated_]order to benefit from changes introduced in 3.14 (closes #1942758)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
2 |
---------------------------- |
9bbf83f68bcc
[entity] upgrade fetch_[unrelated_]order to benefit from changes introduced in 3.14 (closes #1942758)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
3 |
|
7859
15809afe093b
[migration doc] talk about changes in Entity.fetch_rql
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
7828
diff
changeset
|
4 |
* `Entity.fetch_rql` `restriction` argument has been deprecated and should be |
15809afe093b
[migration doc] talk about changes in Entity.fetch_rql
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
7828
diff
changeset
|
5 |
replaced with a call to the new `Entity.fetch_rqlst` method, get the returned |
15809afe093b
[migration doc] talk about changes in Entity.fetch_rql
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
7828
diff
changeset
|
6 |
value (a rql `Select` node) and use the RQL syntax tree API to include the |
15809afe093b
[migration doc] talk about changes in Entity.fetch_rql
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
7828
diff
changeset
|
7 |
above-mentionned restrictions. |
15809afe093b
[migration doc] talk about changes in Entity.fetch_rql
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
7828
diff
changeset
|
8 |
|
15809afe093b
[migration doc] talk about changes in Entity.fetch_rql
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
7828
diff
changeset
|
9 |
Backward compat is kept with proper warning. |
15809afe093b
[migration doc] talk about changes in Entity.fetch_rql
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
7828
diff
changeset
|
10 |
|
7827
9bbf83f68bcc
[entity] upgrade fetch_[unrelated_]order to benefit from changes introduced in 3.14 (closes #1942758)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
11 |
* `Entity.fetch_order` and `Entity.fetch_unrelated_order` class methods have been |
9bbf83f68bcc
[entity] upgrade fetch_[unrelated_]order to benefit from changes introduced in 3.14 (closes #1942758)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
12 |
replaced by `Entity.cw_fetch_order` and `Entity.cw_fetch_unrelated_order` with |
9bbf83f68bcc
[entity] upgrade fetch_[unrelated_]order to benefit from changes introduced in 3.14 (closes #1942758)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
13 |
a different prototype: |
9bbf83f68bcc
[entity] upgrade fetch_[unrelated_]order to benefit from changes introduced in 3.14 (closes #1942758)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
14 |
|
9bbf83f68bcc
[entity] upgrade fetch_[unrelated_]order to benefit from changes introduced in 3.14 (closes #1942758)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
15 |
- instead of taking (attr, var) as two string argument, they now take (select, |
9bbf83f68bcc
[entity] upgrade fetch_[unrelated_]order to benefit from changes introduced in 3.14 (closes #1942758)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
16 |
attr, var) where select is the rql syntax tree beinx constructed and var the |
9bbf83f68bcc
[entity] upgrade fetch_[unrelated_]order to benefit from changes introduced in 3.14 (closes #1942758)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
17 |
variable *node*. |
9bbf83f68bcc
[entity] upgrade fetch_[unrelated_]order to benefit from changes introduced in 3.14 (closes #1942758)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
18 |
|
9bbf83f68bcc
[entity] upgrade fetch_[unrelated_]order to benefit from changes introduced in 3.14 (closes #1942758)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
19 |
- instead of returning some string to be inserted in the ORDERBY clause, it has |
9bbf83f68bcc
[entity] upgrade fetch_[unrelated_]order to benefit from changes introduced in 3.14 (closes #1942758)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
20 |
to modify the syntax tree |
9bbf83f68bcc
[entity] upgrade fetch_[unrelated_]order to benefit from changes introduced in 3.14 (closes #1942758)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
21 |
|
9bbf83f68bcc
[entity] upgrade fetch_[unrelated_]order to benefit from changes introduced in 3.14 (closes #1942758)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
22 |
Backward compat is kept with proper warning, BESIDE cases below: |
9bbf83f68bcc
[entity] upgrade fetch_[unrelated_]order to benefit from changes introduced in 3.14 (closes #1942758)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
23 |
|
9bbf83f68bcc
[entity] upgrade fetch_[unrelated_]order to benefit from changes introduced in 3.14 (closes #1942758)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
24 |
- custom order method return **something else the a variable name with or |
9bbf83f68bcc
[entity] upgrade fetch_[unrelated_]order to benefit from changes introduced in 3.14 (closes #1942758)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
25 |
without the sorting order** (e.g. cases where you sort on the value of a |
9bbf83f68bcc
[entity] upgrade fetch_[unrelated_]order to benefit from changes introduced in 3.14 (closes #1942758)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
26 |
registered procedure as it was done in the tracker for instance). In such |
9bbf83f68bcc
[entity] upgrade fetch_[unrelated_]order to benefit from changes introduced in 3.14 (closes #1942758)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
27 |
case, an error is logged telling that this sorting is ignored until API |
9bbf83f68bcc
[entity] upgrade fetch_[unrelated_]order to benefit from changes introduced in 3.14 (closes #1942758)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
28 |
upgrade. |
9bbf83f68bcc
[entity] upgrade fetch_[unrelated_]order to benefit from changes introduced in 3.14 (closes #1942758)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
29 |
|
9bbf83f68bcc
[entity] upgrade fetch_[unrelated_]order to benefit from changes introduced in 3.14 (closes #1942758)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
30 |
- client code use direct access to one of those methods on an entity (no code |
9bbf83f68bcc
[entity] upgrade fetch_[unrelated_]order to benefit from changes introduced in 3.14 (closes #1942758)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
31 |
known to do that) |
9bbf83f68bcc
[entity] upgrade fetch_[unrelated_]order to benefit from changes introduced in 3.14 (closes #1942758)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
diff
changeset
|
32 |
|
7828
749e1a67987f
[entity] rename Entity._rest_attr_info into cw_rest_attr_info (closes #1942759)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
7827
diff
changeset
|
33 |
* `Entity._rest_attr_info` class method has been renamed to |
749e1a67987f
[entity] rename Entity._rest_attr_info into cw_rest_attr_info (closes #1942759)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
7827
diff
changeset
|
34 |
`Entity.cw_rest_attr_info` |
749e1a67987f
[entity] rename Entity._rest_attr_info into cw_rest_attr_info (closes #1942759)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
7827
diff
changeset
|
35 |
|
749e1a67987f
[entity] rename Entity._rest_attr_info into cw_rest_attr_info (closes #1942759)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
7827
diff
changeset
|
36 |
No backward compat yet since this is a protected method an no code is known to |
749e1a67987f
[entity] rename Entity._rest_attr_info into cw_rest_attr_info (closes #1942759)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
7827
diff
changeset
|
37 |
use it outside cubicweb itself. |
749e1a67987f
[entity] rename Entity._rest_attr_info into cw_rest_attr_info (closes #1942759)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
7827
diff
changeset
|
38 |
|
7875
65e460690139
[form, entity] refactor '__linkto', now handled by the entity form, not the entity itself. Closes #1931543
Florent Cayré <florent.cayre@gmail.com>
parents:
7859
diff
changeset
|
39 |
* `AnyEntity.linked_to` has been removed as part of a refactoring of this |
65e460690139
[form, entity] refactor '__linkto', now handled by the entity form, not the entity itself. Closes #1931543
Florent Cayré <florent.cayre@gmail.com>
parents:
7859
diff
changeset
|
40 |
functionality (link a entity to another one at creation step). It was replaced |
65e460690139
[form, entity] refactor '__linkto', now handled by the entity form, not the entity itself. Closes #1931543
Florent Cayré <florent.cayre@gmail.com>
parents:
7859
diff
changeset
|
41 |
by a `EntityFieldsForm.linked_to` property. |
65e460690139
[form, entity] refactor '__linkto', now handled by the entity form, not the entity itself. Closes #1931543
Florent Cayré <florent.cayre@gmail.com>
parents:
7859
diff
changeset
|
42 |
|
65e460690139
[form, entity] refactor '__linkto', now handled by the entity form, not the entity itself. Closes #1931543
Florent Cayré <florent.cayre@gmail.com>
parents:
7859
diff
changeset
|
43 |
In the same refactoring, `cubicweb.web.formfield.relvoc_linkedto`, |
65e460690139
[form, entity] refactor '__linkto', now handled by the entity form, not the entity itself. Closes #1931543
Florent Cayré <florent.cayre@gmail.com>
parents:
7859
diff
changeset
|
44 |
`cubicweb.web.formfield.relvoc_init` and |
65e460690139
[form, entity] refactor '__linkto', now handled by the entity form, not the entity itself. Closes #1931543
Florent Cayré <florent.cayre@gmail.com>
parents:
7859
diff
changeset
|
45 |
`cubicweb.web.formfield.relvoc_unrelated` were removed and replaced by |
65e460690139
[form, entity] refactor '__linkto', now handled by the entity form, not the entity itself. Closes #1931543
Florent Cayré <florent.cayre@gmail.com>
parents:
7859
diff
changeset
|
46 |
RelationField methods with the same names, that take a form as a parameter. |
65e460690139
[form, entity] refactor '__linkto', now handled by the entity form, not the entity itself. Closes #1931543
Florent Cayré <florent.cayre@gmail.com>
parents:
7859
diff
changeset
|
47 |
|
65e460690139
[form, entity] refactor '__linkto', now handled by the entity form, not the entity itself. Closes #1931543
Florent Cayré <florent.cayre@gmail.com>
parents:
7859
diff
changeset
|
48 |
**No backward compatibility yet**. It's still time to cry for it. |
65e460690139
[form, entity] refactor '__linkto', now handled by the entity form, not the entity itself. Closes #1931543
Florent Cayré <florent.cayre@gmail.com>
parents:
7859
diff
changeset
|
49 |
Cubes known to be affected: tracker, vcsfile, vcreview |
65e460690139
[form, entity] refactor '__linkto', now handled by the entity form, not the entity itself. Closes #1931543
Florent Cayré <florent.cayre@gmail.com>
parents:
7859
diff
changeset
|
50 |