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

Refer to new unsynced items from other new items #85

Closed
tomaszn opened this issue May 2, 2017 · 2 comments
Closed

Refer to new unsynced items from other new items #85

tomaszn opened this issue May 2, 2017 · 2 comments

Comments

@tomaszn
Copy link
Contributor

tomaszn commented May 2, 2017

I need to be able to create a set of items when offline (and have the references still working when the connection is established). Is it now possible?
It looks like the model API (e.g. "find" method) doesn't seem to find unsynced items.

@sheppard
Copy link
Member

sheppard commented May 2, 2017

Yes, that is possible as of wq.app 1.0.0b2. However, it does not work with the [model].find() API as of yet. You can use the separate [model].unsyncedItems() to get at those records. unsyncedItems() is called automatically during form rendering by the _getOutboxRecords() function in wq/app.js. When used with the xlsconv 0.3.0 and newer templates, there should be a * next to any foreign key <option> that has not yet been synced.

Relevant commits:
a968a75
2bb1c31
6fc734a
wq/xlsform-converter@b794a15

@sheppard
Copy link
Member

When using the new IMMEDIATE mode for @wq/outbox, find() is able to see the unsynced records. See #86.

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

No branches or pull requests

2 participants