Change record status: 
Project: 
Introduced in branch: 
3.x
Introduced in version: 
3.0.0-beta1
Description: 

Quantity entities of type material have a material_type field for referencing taxonomy terms in the material_type vocabulary.

In farmOS 2.x, this is a single-value term reference field.

In farmOS 3.x, this is a multi-value term reference field.

This affects developers who use the farmOS data model, either internally via PHP, or externally via API.

The difference in JSON:API representation of a material quantity entity is illustrated below:

Before:

{
  "type": "quantity--material",
  "id": "a1a0512f-1ab7-41f7-873f-c1d11e7f6b6a",
  ...
  "attributes": {
    ...
  },
  "relationships": {
    ...
    "material_type": {
      "data": {
        "type": "taxonomy_term--material_type",
        "id": "c0131694-c77e-4786-905b-52f433e2e790",
        "meta": {...}
      },
      ...
    }
  }
}

After:

{
  "type": "quantity--material",
  "id": "a1a0512f-1ab7-41f7-873f-c1d11e7f6b6a",
  ...
  "attributes": {
    ...
  },
  "relationships": {
    ...
    "material_type": {
      "data": [
        {
          "type": "taxonomy_term--material_type",
          "id": "c0131694-c77e-4786-905b-52f433e2e790",
          "meta": {...}
        }
      ],
      ...
    }
  }
}

Impacts: 
Module developers