Skip to content

Public method for getting the resource's ID? #73

@multimeric

Description

@multimeric

We have a few ways of getting the resource ID: resource._getUid() works, but the underscore makes it look like an internal method I shouldn't depend on. resource.toJSON().id also works, but it processes the entire data structure which I don't need. Finally, resource.get('id') doesn't work, which surprises me.

Is there a recommended and stable way of getting a resource object's ID?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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