Thanks to visit codestin.com
Credit goes to github.com

Skip to content

PUT endpoint does not return correct id (maybe rowid?) #37

@danscully

Description

@danscully

Bug or feature request

  • [X ] Bug
  • Feature request

Description of feature (or steps to reproduce if bug)

Create a model with an id as type "string", and a defaultFN of "uuid". PUT a new instance using the REST api through explorer. The response body will show an integer id (presumably an integer that corresponds to the ROWID or something like that). Now use the GET api to list all model instances. The instance will show an id in the correct uuid format.

Link to sample repo to reproduce issue (if bug)

Expected result

I'm assuming the response body should reflect the id generated by defaultFN.

Actual result (if bug)

Its an integer.

Additional information (Node.js version, LoopBack version, etc)

Loopback 3, node 8.11.2

I'm anticipating a reply of "why are you using a string for a key?" The answer is complicated based in integration with a larger project. If the answer is "we don't support that" we'll make it work, but I wanted to check to make sure. Thanks

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