From 3cf4c6e27d663dd2bd67a3b9b874f6e49c43241b Mon Sep 17 00:00:00 2001 From: Tglman Date: Tue, 24 Sep 2024 14:57:01 +0100 Subject: [PATCH] fix: minor fix in link converter --- .../orient/core/db/tool/importer/OLinkConverter.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/orientechnologies/orient/core/db/tool/importer/OLinkConverter.java b/core/src/main/java/com/orientechnologies/orient/core/db/tool/importer/OLinkConverter.java index e0e2ddc4e4a..01ab28715d3 100644 --- a/core/src/main/java/com/orientechnologies/orient/core/db/tool/importer/OLinkConverter.java +++ b/core/src/main/java/com/orientechnologies/orient/core/db/tool/importer/OLinkConverter.java @@ -26,7 +26,12 @@ public OIdentifiable convert(OIdentifiable value) { "select value from " + ODatabaseImport.EXPORT_IMPORT_CLASS_NAME + " where key = ?", rid.toString())) { if (resultSet.hasNext()) { - return new ORecordId((String) resultSet.next().getProperty("value")); + Object id = resultSet.next().getProperty("value"); + if (id instanceof OIdentifiable) { + return (OIdentifiable) id; + } else if (id instanceof String) { + return new ORecordId((String) id); + } } return value; }