rsanchez / json

Output ExpressionEngine data in JSON format.
http://devot-ee.com/add-ons/json/
100 stars 236 forks source link

Using a relationship field in a grid as a column always results in an empty value. #30

Closed code-poel closed 10 years ago

code-poel commented 10 years ago

If you are utilizing a grid fieldtype in your channel and one of the grid columns is set to be a relationship fieldtype, the JSON representation of the grid field's relationship column will always be an empty string.

rsanchez commented 10 years ago

The plugin only retrieves the raw data from exp_channel_grid_field_X table (where grid rows are stored). This must mean that the relationship data is not stored in that grid table, but its own table.

Obviously, the way it is now is not ideal. But I'll have to file this one as a feature request for now.

code-poel commented 10 years ago

Looks like it's stored in exp_relationships which contains grid information as well.