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

UpdateAction version 2 not equivalent to UpdateAction version 1 #391

Closed
AlvaroVega opened this issue Oct 4, 2019 · 2 comments
Closed

UpdateAction version 2 not equivalent to UpdateAction version 1 #391

AlvaroVega opened this issue Oct 4, 2019 · 2 comments
Labels

Comments

@AlvaroVega
Copy link
Member

AlvaroVega commented Oct 4, 2019

Comes from #389

connection.v2.createEntity(changes, { upsert: true }).then(

    // FIXME: createEntity with upsert true is always updating entity,
    // but is not using params.actionType (append or update)
    // Maybe other methods like v2.updateEntityAttributes are more proper ?

UpdateAction with version 2 was introduced by PR #305

UpdateAction with filter (and version2) is working well

@AlvaroVega AlvaroVega added the bug label Oct 4, 2019
@fgalan
Copy link
Member

fgalan commented Oct 4, 2019

As commented at Skype, maybe the following could work:

 connection.v2.createEntity(changes, { upsert: (actionType !== 'update')}).then( 

@fgalan
Copy link
Member

fgalan commented Oct 14, 2019

Fixed by PR #394. But let's have this issue opened for a while... so we can ensure it works in e2e CI.

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

No branches or pull requests

2 participants