Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

save 的行为和 JS SDK 不一致 #489

Copy link
Copy link

Description

@weakish
Issue body actions
const d = await new AV.Query('TestObject').get('5f27bc73fbb489000824300d')
console.log(d.get('testList'))
listData = d.get('testList')
listData.push('debug')
await d.save()

上面这段 JS 代码,最终云端的 testList 会包含 debug 这个值,但是等效的 Python 代码,testList 并不会包含 debug 这个值。 python SDK 的 save 没有 JS SDK 的这么智能。python SDK 只有在调用 set 方法(或 add_unique 之类的类 set 方法时才会更新内部维护的 _changes 状态,最终在 save 时将更新发送给云端)。python SDK 的行为实现上更简单,但可能导致用户感到困惑。下一个大版本需要考虑是否需要把行为改成和 JS SDK 一致。

相关论坛帖子 23120

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    nextbreaking changesbreaking changes

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.