-
Notifications
You must be signed in to change notification settings - Fork 18
Last sync support for Indexed Fixtures #842
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
Conversation
| @Override | ||
| public AbstractTreeElement getAttribute(String namespace, String name) { | ||
| TreeElement attr = attrHolder.getAttribute(namespace, name); | ||
| attr.setParent(this); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you confirm that this method has no side effects that affect the current object (this)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only affect is that invalidates the reference cache for this. Is this something to be worried about ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, invalidating the reference cache is fine, I just wanted to make sure that this wouldn't result in a "Backlink" being created where "this" (the treelement part of the object) now has an independent reference to attr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it. Doesn't look like that's happening.
Refactoring to support root atrributes lookup for Android indexed fixture.
IndexedFixtureIdentifierto hold basic/meta properties for an indexed fixture.IndexedFixtureInstanceTreeElementto have hold attributes inTreeElement attrHolderT getAttribute(String namespace, String name)toAbstractTreeElement getAttribute(String namespace, String name)to be able to returnlast_syncas an instance ofAbstractTreeElementrather thanIndexedFixtureChildElement. It's possible that it's not the right soultion here but I could not think of any alternates.cross-request: dimagi/commcare-android#2085