diff --git a/entity-store/src/main/kotlin/jetbrains/exodus/entitystore/orientdb/OVertexEntity.kt b/entity-store/src/main/kotlin/jetbrains/exodus/entitystore/orientdb/OVertexEntity.kt index 5c6a32064..dae096f3b 100644 --- a/entity-store/src/main/kotlin/jetbrains/exodus/entitystore/orientdb/OVertexEntity.kt +++ b/entity-store/src/main/kotlin/jetbrains/exodus/entitystore/orientdb/OVertexEntity.kt @@ -27,10 +27,7 @@ import com.jetbrains.youtrack.db.internal.core.id.RecordId import com.jetbrains.youtrack.db.internal.core.record.RecordAbstract import com.jetbrains.youtrack.db.internal.core.record.impl.RecordBytes import jetbrains.exodus.ByteIterable -import jetbrains.exodus.entitystore.Entity -import jetbrains.exodus.entitystore.EntityId -import jetbrains.exodus.entitystore.EntityIterable -import jetbrains.exodus.entitystore.EntityRemovedInDatabaseException +import jetbrains.exodus.entitystore.* import jetbrains.exodus.entitystore.orientdb.OVertexEntity.Companion.CLASS_ID_CUSTOM_PROPERTY_NAME import jetbrains.exodus.entitystore.orientdb.OVertexEntity.Companion.LOCAL_ENTITY_ID_PROPERTY_NAME import jetbrains.exodus.entitystore.orientdb.OVertexEntity.Companion.linkTargetEntityIdPropertyName @@ -140,6 +137,7 @@ open class OVertexEntity(vertex: Vertex, private val store: OEntityStore) : OEnt override fun generateId() { val type = oEntityId.getTypeName() + vertexRecord = store.currentTransaction!!.asOStoreTransaction().bindToSession(vertexRecord) store.requireActiveTransaction().generateEntityId(type, vertexRecord) oEntityId = ORIDEntityId.fromVertex(vertexRecord) } @@ -571,9 +569,5 @@ fun Vertex.requireLocalEntityId(): Long { ?: throw IllegalStateException("localEntityId not found for the vertex") } -fun OVertexEntity.asReadonly(): OReadonlyVertexEntity { - return OReadonlyVertexEntity(vertex, store as OPersistentEntityStore) -} - val String.asEdgeClass get() = OVertexEntity.edgeClassName(this)