bookshelf-api
bookshelf-api copied to clipboard
Problem using UUIDs
I'm using UUIDs as IDs in my models. When I make a GET request with an id (e.g. user/:id) and the UUID starts with a number, the related objects (oneToMany) aren't loaded. It works when the UUID starts with a letter.
I'm guessing, that somewhere the ID is converted to a number.
@Banbury thanks for the bug report. I'll take a look at this and let report back when I have a fix.
@Banbury just did a little bit of digging and I can't seem to reproduce the error that you're talking about. I've added two unit tests here that I think mimic the problem you're describing. If you're still running into this issue could you share...
- your database schema
- some example data
- the get request that is failing
- any errors that you see
Thanks!