FiguredLimited/vue-mc

Using special Identifier always performs update

CristianaPereira opened this issue · 0 comments

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')) }