Skip to content
New issue

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

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

Already on GitHub? # to your account

Save recursively #190

Merged

Conversation

yulingtianxia
Copy link
Contributor

  1. Support save objects recursively.
  2. Fix encoding for Add and Remove operations.
  3. Fix some exceptions.
  4. Support batch request and handle response.

@yulingtianxia
Copy link
Contributor Author

There are a lot of things to do:

  1. Check dirty objects and unsaved changes.
  2. Reconstruction Add, Remove, AddRelation, RemoveRelation ... Array operations should be incremental.
  3. Complete features in ACL.

@phillwiggins
Copy link
Member

Great work.

It looks like a large amount of changes. I will have to review them and run some tests, but happy to merge this branch for now,

@phillwiggins phillwiggins merged commit 7b24830 into parse-community:release/1.0.22 Jun 6, 2019
@yulingtianxia yulingtianxia deleted the save_recursively branch June 6, 2019 10:52
@RodrigoSMarques
Copy link
Contributor

Hi,
I tried running this version and I have the following errors.
It's calling Sebast, I do not remember who made the change, but had suggested to leave SharedPreference with default.

Launching lib/main.dart on iPhone Xʀ in debug mode...
Xcode build done.                                           12,0s
[VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: NoSuchMethodError: The getter 'length' was called on null.
Receiver: null
Tried calling: length
#0      Object.noSuchMethod  (dart:core-patch/object_patch.dart:50:5)
#1      XXTEA._fixkey
#2      XXTEA.encrypt
#3      XXTEA.encryptToString
#4      _XXTeaEncoder.convert
#5      Codec.encode  (dart:convert/codec.dart:21:32)
#6      getCodecEncodedSignature
#7      SembastDatabase.open.<anonymous closure>._openDone
<asynchronous suspension>
#8      SembastDatabase.open.<anonymous closure>
<asynchronous suspension>
#9      BasicLock.synchronized
<asynchronous suspension>
#10     SembastDatabase.open (p<>

@yulingtianxia
Copy link
Contributor Author

yulingtianxia commented Jun 6, 2019

@RodrigoSMarques Have you ever tried the previous version? Perhaps it's a data issue.
It throws exception on calling openDatabase:
image

phillwiggins added a commit that referenced this pull request Jun 11, 2019
* Added repo example

* create CoreStore interface to allow different implements for local storage (#166) (#167)

implement default local store using sembast and with encryption using XXTEA algorithm

add desktop support in example project

* Lint/Code clean

* Some dart linter fixes (#171)

* Support Relation (#179)

* create CoreStore interface to allow different implements for local storage (#166)

implement default local store using sembast and with encryption using XXTEA algorithm

add desktop support in example project

* make parse shared preferences default store (#168)

* add decion page to detect parse server availability
throw execption if server url is empty
navigate to correct page base on current user state

* working on example

throw exception if sever url is empty 
add decision page to check availability of parse server

 navigate to screen base on current user state

* create example flow for login and #
display list of diet plan items and allow to remove and update it's status

* add shared preferences corestore
fix bug when create custom corestore implementation

* use shared shared preferences in example

* make parse shared preferences default store

* Update application_constants.dart

* README.md updated from https://stackedit.io/

* Support Relation.

* delete vscode config

* Update .gitignore

* Fix Commit: 6ed26e1 (#181)

* Delete `toJson` and fix exception. (#187)

* Fix Commit: 6ed26e1

* Update parse_encoder.dart

Fix parse encoder bug.

* Fix exception when sendSessionId is null.

* delete toJson calling.

* Save recursively (#190)

* Fix Commit: 6ed26e1

* Update parse_encoder.dart

Fix parse encoder bug.

* Fix exception when sendSessionId is null.

* 1. Support save objects recursively.
2. Fix encoding for Add and Remove operations.
3. Fix some exceptions.
4. Support batch request and handle response.

* Implemented whereRelatedTo query (#192)

* Implemented querying for related objects defined based on a field of type Relation

* Implemented unit test for relatedTo query

* Release v1.0.22 - Fix CoreStore bug
@zenz
Copy link
Contributor

zenz commented Jun 18, 2019

@RodrigoSMarques Hi,
Did you solve the issue of
"[VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: NoSuchMethodError: The getter 'length' was called on null.

How did you solve it? is that some internal function name changed so makes this error?

When I use VSCode to track, I can reach where @yulingtianxia point out. but VSCode cannot see the local instance data, Android-Studio can do it, but I don't want to install such a huge thing.........

@zenz
Copy link
Contributor

zenz commented Jun 18, 2019

I had figure out why this issue happened.
verison 1.0.22 need masterKey while do Parse().initialize().
When those functions don't need masterKey permission, please don't ask for it.

@RodrigoSMarques
Copy link
Contributor

HI @zenz
Use await in Parse().initialize.
It was one of the changes that occurred in version 22

await Parse().initialize("xxxxxxxxxx",
      "xxxxxxxxxxxxxx",
      autoSendSessionId: true,
      liveQueryUrl: "xxxxxxxxxxxxxx");

fischerscode pushed a commit to fischerscode/Parse-SDK-Flutter that referenced this pull request Sep 5, 2020
* Fix Commit: 6ed26e1

* Update parse_encoder.dart

Fix parse encoder bug.

* Fix exception when sendSessionId is null.

* 1. Support save objects recursively.
2. Fix encoding for Add and Remove operations.
3. Fix some exceptions.
4. Support batch request and handle response.
fischerscode pushed a commit to fischerscode/Parse-SDK-Flutter that referenced this pull request Sep 5, 2020
* Added repo example

* create CoreStore interface to allow different implements for local storage (parse-community#166) (parse-community#167)

implement default local store using sembast and with encryption using XXTEA algorithm

add desktop support in example project

* Lint/Code clean

* Some dart linter fixes (parse-community#171)

* Support Relation (parse-community#179)

* create CoreStore interface to allow different implements for local storage (parse-community#166)

implement default local store using sembast and with encryption using XXTEA algorithm

add desktop support in example project

* make parse shared preferences default store (parse-community#168)

* add decion page to detect parse server availability
throw execption if server url is empty
navigate to correct page base on current user state

* working on example

throw exception if sever url is empty 
add decision page to check availability of parse server

 navigate to screen base on current user state

* create example flow for login and #
display list of diet plan items and allow to remove and update it's status

* add shared preferences corestore
fix bug when create custom corestore implementation

* use shared shared preferences in example

* make parse shared preferences default store

* Update application_constants.dart

* README.md updated from https://stackedit.io/

* Support Relation.

* delete vscode config

* Update .gitignore

* Fix Commit: 6ed26e1 (parse-community#181)

* Delete `toJson` and fix exception. (parse-community#187)

* Fix Commit: 6ed26e1

* Update parse_encoder.dart

Fix parse encoder bug.

* Fix exception when sendSessionId is null.

* delete toJson calling.

* Save recursively (parse-community#190)

* Fix Commit: 6ed26e1

* Update parse_encoder.dart

Fix parse encoder bug.

* Fix exception when sendSessionId is null.

* 1. Support save objects recursively.
2. Fix encoding for Add and Remove operations.
3. Fix some exceptions.
4. Support batch request and handle response.

* Implemented whereRelatedTo query (parse-community#192)

* Implemented querying for related objects defined based on a field of type Relation

* Implemented unit test for relatedTo query

* Release v1.0.22 - Fix CoreStore bug
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants