Load reverse relations mappings at startup

This allows Zotero.Relations.getByPredicateAndObject()/getByObject() and
Zotero.Item::getLinkedItem()/Zotero.Collection::getLinkedCollection() to
be synchronous, which is necessary for word processor integration.
This commit is contained in:
Dan Stillman 2016-03-18 04:04:33 -04:00
parent 5d3e7f555c
commit da45df06cc
12 changed files with 187 additions and 92 deletions

View file

@ -14,7 +14,7 @@ describe("Zotero.Relations", function () {
]
})
yield item.saveTx();
var objects = yield Zotero.Relations.getByPredicateAndObject(
var objects = Zotero.Relations.getByPredicateAndObject(
'item', 'owl:sameAs', 'http://zotero.org/groups/1/items/SRRMGSRM'
);
assert.lengthOf(objects, 1);