You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that outEdges() and inEdges() are incorrectly validating the collection against the passed in IDs on 7.x driver.
This Jest unit test fails:
it('Gets in edges and out edges from Arango',async()=>{constdb=newDatabase({url: config.arangoDb.url,databaseName: config.arangoDb.database})constedgeCollection=awaitdb.createEdgeCollection('links')constedgeCollectionData=awaitedgeCollection.get()expect(edgeCollectionData.type).toBe(CollectionType.EDGE_COLLECTION)awaitexpect(edgeCollection.outEdges('notLinks/test1')).resolves.toBeEmptyArray()awaitexpect(edgeCollection.inEdges('notLinks/test1')).resolves.toBeEmptyArray()})
The error message is:
Document ID "notLinks/test1" does not match collection name "links"
How are these functions, which are available only on EdgeCollection types, supposed to work now? The entire semantics of the functions rely on the document IDs not matching the edge collection name.
Oops, you're right. documentHandle should take a flag to decide whether it should allow foreign collections to support this use case. This also affects edges.
Having this same issue trying to retrieve in/out edges on a particular document. @robross0606 thank you for the clear issue report! I think I can manage a workaround in my app, but was feeling like I was crazy for expecting the edge collection to be able to reference a document's id. Always good to be able to point to a clear bug rather than a mystery.
It appears that
outEdges()
andinEdges()
are incorrectly validating the collection against the passed in IDs on 7.x driver.This Jest unit test fails:
The error message is:
How are these functions, which are available only on
EdgeCollection
types, supposed to work now? The entire semantics of the functions rely on the document IDs not matching the edge collection name.I suspect this is a regression caused by http://arangodb.github.io/arangojs/MIGRATING#cross-collection-operations.
The text was updated successfully, but these errors were encountered: