Skip to content

Commit

Permalink
Merge pull request #216 from JetBrains/XD-1146
Browse files Browse the repository at this point in the history
Fix of issue #XD-1146, vertex reset uses raw record.
  • Loading branch information
andrii0lomakin authored Nov 4, 2024
2 parents 2bf6da5 + 0bf4d4e commit a23450e
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,18 +122,18 @@ open class OVertexEntity(vertex: OVertex, private val store: OEntityStore) : OEn
}

override fun resetToNew() {
val clusterId = vertex.identity.clusterId
val clusterId = vertexRecord.identity.clusterId

vertex.identity.reset()
vertex.resetToNew()
vertexRecord.identity.reset()
vertexRecord.resetToNew()

(vertex.identity as ORecordId).clusterId = clusterId
(vertexRecord.identity as ORecordId).clusterId = clusterId
}

override fun generateId() {
val type = oEntityId.getTypeName()
store.requireActiveTransaction().generateEntityId(type, vertex)
oEntityId = ORIDEntityId.fromVertex(vertex)
store.requireActiveTransaction().generateEntityId(type, vertexRecord)
oEntityId = ORIDEntityId.fromVertex(vertexRecord)
}

private fun requireActiveTx(): OStoreTransaction {
Expand Down

0 comments on commit a23450e

Please sign in to comment.