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
{{ message }}
Repository navigation
SQL: "bothE" function returns number of edges instead of array of edges #1590
The reason is that bothE returns a collection. I think it was introduced to avoid serializing vertices with thousands of edges. But in your case you're expressly asking for them, so it should return the edges, not the counter.
Activity
gramian commentedon May 17, 2024
The problem is probably here: https://github.com/ArcadeData/arcadedb/blob/main/engine/src/main/java/com/arcadedb/graph/GraphEngine.java#L438 .
gramian commentedon Jun 9, 2024
@lvca this is weird:
Changing in https://github.com/ArcadeData/arcadedb/blob/main/engine/src/main/java/com/arcadedb/graph/GraphEngine.java#L438 :
to:
seems to make it work, but I do not understand why, as for vertices (see
getVerticesin the same file) it works correctly without the() ->.lvca commentedon Jun 9, 2024
The issue is here:
arcadedb/engine/src/main/java/com/arcadedb/serializer/JsonSerializer.java
Line 107 in 4281a1c
From studio if you want to see the result in a table use this
SELECT expand( bothE() ) FROM V.With HTTP/JSON API, the recommended serializer used is "graph" that also uses this settings, so the result would still be 2.
gramian commentedon Jun 9, 2024
OK, but why do
inEandoutEwork as expected? Also I confirm thatbothEworks in console.lvca commentedon Jun 12, 2024
The reason is that
bothEreturns a collection. I think it was introduced to avoid serializing vertices with thousands of edges. But in your case you're expressly asking for them, so it should return the edges, not the counter.12 remaining items
fix: json serializer now is consistent with edges retrieved in differ…
chore(studio-deps-dev)(deps-dev): bump css-loader from 6.11.0 to 7.1.…
fix: json serializer now is consistent with edges retrieved in differ…
fix: json serializer now is consistent with edges retrieved in differ…
chore(studio-deps-dev)(deps-dev): bump css-loader from 6.11.0 to 7.1.…
chore(deps): bump the github-actions group with 5 updates [skip ci]