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
Document.get_type_name() returns a java.lang.String on arcadedb-jvm, a str on arcadedb #286
Document.get_type_name() (and so Vertex and Edge) returns a Python str on the native arcadedb build but a raw java.lang.String on arcadedb-jvm. graph.py returns self._java_document.getTypeName() unconverted on the JVM build, while the native wrapper returns the str it got in its snapshot.
The Java string compares equal to a str, so record.get_type_name() == "Person" works on both. It is not a str subclass, so string operations fail: "created " + record.get_type_name() raises TypeError: can only concatenate str (not "java.lang.String") to str on arcadedb-jvm and works on arcadedb. record.get(...), to_dict() values and get_rid() are Python str on both builds.
I found it while writing the functions and events docs page (#284), where a page example failed on the JVM build in CI. The page now documents the difference and tells readers to use str(record.get_type_name()), with a test that pins it.
The fix is one line in graph.py (str(...) around getTypeName()), plus a test that asserts type(...) is str on both builds. I can send the PR once #284 has merged, so the page loses that bullet in the same change.
Activity
Return a Python str from Database.get_database_path(), get_name() and…
COLUMNAR index on both builds: reflection metadata, reopen and the co…