doc/3.14.rst
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--
[form, entity] refactor '__linkto', now handled by the entity form, not the entity itself. Closes #1931543

API changes in cubicweb 3.14
----------------------------

* `Entity.fetch_rql` `restriction` argument has been deprecated and should be
  replaced with a call to the new `Entity.fetch_rqlst` method, get the returned
  value (a rql `Select` node) and use the RQL syntax tree API to include the
  above-mentionned restrictions.

  Backward compat is kept with proper warning.

* `Entity.fetch_order` and `Entity.fetch_unrelated_order` class methods have been
  replaced by `Entity.cw_fetch_order` and `Entity.cw_fetch_unrelated_order` with
  a different prototype:

  - instead of taking (attr, var) as two string argument, they now take (select,
    attr, var) where select is the rql syntax tree beinx constructed and var the
    variable *node*.

  - instead of returning some string to be inserted in the ORDERBY clause, it has
    to modify the syntax tree

  Backward compat is kept with proper warning, BESIDE cases below:

  - custom order method return **something else the a variable name with or
    without the sorting order** (e.g. cases where you sort on the value of a
    registered procedure as it was done in the tracker for instance). In such
    case, an error is logged telling that this sorting is ignored until API
    upgrade.

  - client code use direct access to one of those methods on an entity (no code
    known to do that)

* `Entity._rest_attr_info` class method has been renamed to
  `Entity.cw_rest_attr_info`

  No backward compat yet since this is a protected method an no code is known to
  use it outside cubicweb itself.

* `AnyEntity.linked_to` has been removed as part of a refactoring of this
  functionality (link a entity to another one at creation step). It was replaced
  by a `EntityFieldsForm.linked_to` property.

  In the same refactoring, `cubicweb.web.formfield.relvoc_linkedto`,
  `cubicweb.web.formfield.relvoc_init` and
  `cubicweb.web.formfield.relvoc_unrelated` were removed and replaced by
  RelationField methods with the same names, that take a form as a parameter.

  **No backward compatibility yet**. It's still time to cry for it.
  Cubes known to be affected: tracker, vcsfile, vcreview