Skip to content

Commit 808aff3

Browse files
committed
fix(bulk-model-sync): adapt to new original reference
1 parent a9011e7 commit 808aff3

File tree

1 file changed

+3
-3
lines changed
  • bulk-model-sync-lib/src/commonMain/kotlin/org/modelix/model/sync/bulk

1 file changed

+3
-3
lines changed

bulk-model-sync-lib/src/commonMain/kotlin/org/modelix/model/sync/bulk/ModelImporter.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ class ModelImporter(
265265
}
266266

267267
private fun syncProperties(node: INode, nodeData: NodeData) {
268-
if (node.getPropertyValue(NodeData.idPropertyKey) == null) {
268+
if (node.originalId() == null) {
269269
node.setPropertyValue(NodeData.idPropertyKey, nodeData.originalId())
270270
}
271271

@@ -303,11 +303,11 @@ class ModelImporter(
303303
}
304304

305305
internal fun INode.originalId(): String? {
306-
return this.getPropertyValue(NodeData.idPropertyKey)
306+
return this.getOriginalReference()
307307
}
308308

309309
internal fun NodeData.originalId(): String? {
310-
return properties[NodeData.idPropertyKey] ?: id
310+
return properties[NodeData.ID_PROPERTY_KEY] ?: id
311311
}
312312

313313
data class ExistingAndExpectedNode(

0 commit comments

Comments
 (0)