Skip to content
This repository has been archived by the owner on Aug 25, 2022. It is now read-only.

Single value fields with multiple properties are returned as multi-value fields with a single property each #39

Open
claudiu-cristea opened this issue Jun 22, 2018 · 0 comments

Comments

@claudiu-cristea
Copy link
Contributor

claudiu-cristea commented Jun 22, 2018

Original post (from https://www.drupal.org/project/rdf_entity/issues/2892361) from @pfrenssen:

I have a problem with a single value field from the Cached Computed Field module. The field is used to store data that is retrieved from a third party REST API, along with an expire time when the field needs to be refreshed . The field has two properties: value and expire which both are integers. I have mapped the value field to be a http://schema.org/userInteractionCount and the expire field is a http://schema.org/expires.

When I populate this field on an entity and save it everything seems to work fine. However when I load the entity again, then the field suddenly contains two items, one containing the value and the other containing the expire:

Array
(
    [0] => Array
        (
            [expire] => 1499188290
        )

    [1] => Array
        (
            [value] => 2
        )
)

The expected result is to have a single field item containing both properties:

Array
(
    [0] => Array
        (
            [expire] => 1499188290,
            [value] => 2
        )
)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant