Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using special Identifier always performs update #95

Open
CristianaPereira opened this issue Jan 24, 2019 · 0 comments
Open

Using special Identifier always performs update #95

CristianaPereira opened this issue Jan 24, 2019 · 0 comments

Comments

@CristianaPereira
Copy link

I am using a custom identifier that is inserted by user.
Even when i'm inserting a new Model, when I do save() it always do the update function because it assumes that my identifier is not null, witch is kinda right. I studied the flow and overwritten the 'identifier' function, that instead of getting the the active attribute gets the saved one. It solved my problem and i thought it was more accurate if the main function did the same. Hope it helps anyone else.

identifier() { return this.saved(this.getOption('identifier')) }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant