Skip to content

PATCH verb for model relation methods #3139

Description

@PaddyMann

As of Loopback 3, we're told to use PATCH if we want to updateAttributes rather than replace an entire model.

Fine. So we've moved over to PATCH.

But I can't find any way to set up an ACL for a related model that I wish to update with a PATCH. If I define it with (e.g.) __update__account, then it's the PUT method that is activated. There doesn't seem to be an equivalent for PATCH.

Not clear if this is a bug or missing documentation (https://loopback.io/doc/en/lb3/Accessing-related-models.html).

The only workaround I can currently think of is to revert to using PUT and add replaceOnPUT to all my models. Wishing someone had added a simpler way of setting replaceOnPUT as default for all models if this is the case.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions