Skip to content

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

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions