Fix currentTransaction in references while using query
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
package nl.astraeus.persistence
|
||||
|
||||
import nl.astraeus.nl.astraeus.persistence.OptimisticLockingException
|
||||
import nl.astraeus.nl.astraeus.persistence.Persistable
|
||||
import nl.astraeus.nl.astraeus.persistence.Persistent
|
||||
import nl.astraeus.nl.astraeus.persistence.TransactionLog
|
||||
import nl.astraeus.nl.astraeus.persistence.find
|
||||
import nl.astraeus.nl.astraeus.persistence.findByIndex
|
||||
import nl.astraeus.nl.astraeus.persistence.index
|
||||
import nl.astraeus.persistence.domain.Person
|
||||
import org.junit.jupiter.api.Assertions.assertNotNull
|
||||
import org.junit.jupiter.api.assertThrows
|
||||
import java.io.File
|
||||
@@ -14,21 +14,6 @@ import kotlin.test.Test
|
||||
|
||||
class TestOptimisticLocking {
|
||||
|
||||
class Person(
|
||||
override var id: Long = 0,
|
||||
override var version: Long = 0,
|
||||
val name: String,
|
||||
val age: Int,
|
||||
) : Persistable, Cloneable {
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 1L
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Person(id=$id, version=$version, name='$name', age=$age)"
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun showTransactions() {
|
||||
val log = TransactionLog(File("data", "test-locking"))
|
||||
|
||||
Reference in New Issue
Block a user