From 28641f46e45e301de953a6bb8c6b62257545f0da Mon Sep 17 00:00:00 2001 From: Matthew Layton Date: Fri, 19 Aug 2022 09:34:08 +0100 Subject: [PATCH] Replaced `@Transient` annotation with `get()` to criteria fields in resolvable implementations to prevent them being included in serialization. --- gradle.properties | 2 +- .../main/kotlin/io/onixlabs/corda/test/contract/Customer.kt | 3 +-- .../src/main/kotlin/io/onixlabs/corda/test/contract/Reward.kt | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/gradle.properties b/gradle.properties index 8f89e8d..4d5a83f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ name=onixlabs-corda-core group=io.onixlabs -version=4.0.2 +version=4.0.3 onixlabs.development.jarsign.keystore=../lib/onixlabs.development.pkcs12 onixlabs.development.jarsign.password=5891f47942424d2acbe108691fdb5ba258712fca7e4762be4327241ebf3dbfa3 diff --git a/onixlabs-corda-test-contract/src/main/kotlin/io/onixlabs/corda/test/contract/Customer.kt b/onixlabs-corda-test-contract/src/main/kotlin/io/onixlabs/corda/test/contract/Customer.kt index c3e1f2f..40a0c0e 100644 --- a/onixlabs-corda-test-contract/src/main/kotlin/io/onixlabs/corda/test/contract/Customer.kt +++ b/onixlabs-corda-test-contract/src/main/kotlin/io/onixlabs/corda/test/contract/Customer.kt @@ -69,8 +69,7 @@ data class Customer( private class RewardResolver(private val customer: Customer) : AbstractPluralResolvable() { - @Transient - override val criteria: QueryCriteria = vaultQuery { + override val criteria: QueryCriteria get() = vaultQuery { expression(RewardEntity::owner equalTo customer.owner) expression(RewardEntity::customerLinearId equalTo customer.linearId.id) expression(RewardEntity::customerExternalId equalTo customer.linearId.externalId) diff --git a/onixlabs-corda-test-contract/src/main/kotlin/io/onixlabs/corda/test/contract/Reward.kt b/onixlabs-corda-test-contract/src/main/kotlin/io/onixlabs/corda/test/contract/Reward.kt index 01716d4..2b51b17 100644 --- a/onixlabs-corda-test-contract/src/main/kotlin/io/onixlabs/corda/test/contract/Reward.kt +++ b/onixlabs-corda-test-contract/src/main/kotlin/io/onixlabs/corda/test/contract/Reward.kt @@ -59,8 +59,7 @@ data class Reward( private class CustomerResolver(private val reward: Reward) : AbstractSingularResolvable() { - @Transient - override val criteria: QueryCriteria = vaultQuery { + override val criteria: QueryCriteria get() = vaultQuery { relevancyStatus(Vault.RelevancyStatus.ALL) linearIds(reward.customerLinearId) }