You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I do new MyJsonModel() I get ids like "-1", "-2" and so on. So Its hard to differntiate between models that need to be created (POST) oder updated (PATCH).
Sorry for a late reply.
I understand that this might be weird, but datx needs some type of an id internally. enableAutoId: false is mostly meant for cases when you're already providing your own id. You could technically override this with static getAutoId() on the model, but as soon as you have two same values, things would start breaking.
Used libraries
core, jsonapi, angular-jsonapi
Library version(s)
@datx/core 3.0.0, @datx/jsonapi 3.0.0, @datx/jsonapi-angular 3.0.0
Sample API response (if relevant)
No response
Environments with the issue
Everwhere
Environments without the issue
No response
Current behavior
When I do
new MyJsonModel()
I get ids like "-1", "-2" and so on. So Its hard to differntiate between models that need to be created (POST) oder updated (PATCH).Expected behavior
The id should be undefined or null when doing
Reproduction steps
The text was updated successfully, but these errors were encountered: