Skip to content

Conversation

@leeyeh
Copy link
Contributor

@leeyeh leeyeh commented Apr 5, 2016

  • 支持 save 时传入 options.query
  • 支持 save 时传入 options.fetchWhenSave
  • 废弃 AV.Object#fetchWhenSave(仍可用)

@codecov-io
Copy link

Current coverage is 64.10%

Merging #249 into master will decrease coverage by -0.06% as of 3116123

@@            master   #249   diff @@
=====================================
  Files           25     25       
  Stmts         2735   2747    +12
  Branches         0      0       
  Methods          0      0       
=====================================
+ Hit           1755   1761     +6
  Partial          0      0       
- Missed         980    986     +6

Review entire Coverage Diff as of 3116123

Powered by Codecov. Updated on successful CI builds.

try {
json._where = options.query.toJSON().where;
} catch (e) {
var error = new Error('options.query is not an AV.Query');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这样处理错误不是很好呀,首先不应该认为只要有异常就是这个原因,然后原异常的调用栈被丢弃掉了,不方便调试。

@aisk
Copy link
Contributor

aisk commented Apr 5, 2016

👍

if (dataObject._where) {
apiURL += ('?where=' + encodeURIComponent(JSON.stringify(dataObject._where)));
delete dataObject._where;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dataObject._fetchWhenSavedataObject._where 会不会有同时存在的情况?如果有,apiURL 可能拼接会有问题。

@wangxiao
Copy link
Contributor

wangxiao commented Apr 5, 2016

我 review 完了。

@jysperm
Copy link
Contributor

jysperm commented Apr 5, 2016

👍

@wangxiao wangxiao merged commit 83a6065 into leancloud:master Apr 5, 2016
@hjiang hjiang removed the in progress label Apr 5, 2016
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

Successfully merging this pull request may close these issues.

6 participants