Skip to content

Can't use a plain id identifier for a relation denormalization #1840

Description

@Taluu

#1762 reverted #1547 to solve a bug, but we were kind of relying on that to be able to fetch / set an entity from its id without using iris or a nested id object.

{
    "id": "d1890e8f-fd21-5283-9087-0df87279077d",
    "mainMedia": "d1890e8f-fd21-5283-9087-0df87279077d"
}

Used to work up to 2.2.3, but since #1762 (and thus 2.2.4...), it doesn't anymore and triggers an error. I know this is not standard (and kinda relying on a bug...), but it's how the front currently works (I opened a ticket on their side to solve their mess). But still, supporting that would be useful imo.

I have an IriConverter decorator, so I could intercept this, but the fact is that in the iri converter, I have no "context" such as the main entity, the property, or its type so I could tinker and make an iri from that before passing it to the decorated service.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions