diff --git a/cpg-core/src/main/java/de/fraunhofer/aisec/cpg/helpers/NameConverter.kt b/cpg-core/src/main/java/de/fraunhofer/aisec/cpg/helpers/NameConverter.kt index 3c8498fe68..ffc8069d79 100644 --- a/cpg-core/src/main/java/de/fraunhofer/aisec/cpg/helpers/NameConverter.kt +++ b/cpg-core/src/main/java/de/fraunhofer/aisec/cpg/helpers/NameConverter.kt @@ -41,16 +41,27 @@ class NameConverter : CompositeAttributeConverter { companion object { const val FIELD_FULL_NAME = "fullName" + const val FIELD_NAME = "name" const val FIELD_LOCAL_NAME = "localName" const val FIELD_NAME_DELIMITER = "nameDelimiter" } override fun toGraphProperties(value: Name): MutableMap { val map = mutableMapOf() + // The full name of the node map[FIELD_FULL_NAME] = value.toString() + + // The local name of the node map[FIELD_LOCAL_NAME] = value.localName + + // The delimiter map[FIELD_NAME_DELIMITER] = value.delimiter + // For reasons such as backwards compatibility and the fact that Neo4J likes to display + // nodes in the UI with a "name" field as default, we also persist the full name (aka the + // toString() representation) as "name" + map[FIELD_NAME] = value.toString() + return map } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index c41de1c63b..9e88caa9a2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] kotlin = "1.8.0" -neo4j = "4.0.1" +neo4j = "4.0.2" log4j = "2.19.0" sonarqube = "3.5.0.2730" spotless = "6.14.0"