ENT-2769 Handle reference states in the JPAUniquenessProvider (#1586)

* Handle reference states in the JPAUniquenessProvider

* Remove unused import
This commit is contained in:
Thomas Schroeter
2018-11-22 19:25:13 +00:00
committed by GitHub
parent 89ea638d05
commit df2c313f23
6 changed files with 139 additions and 7 deletions

View File

@ -57,7 +57,10 @@ class NodeSchemaService(private val extraSchemas: Set<MappedSchema> = emptySet()
Pair(NodeCoreV1, SchemaOptions()))
fun internalSchemas() = requiredSchemas.keys + extraSchemas.filter { schema -> // when mapped schemas from the finance module are present, they are considered as internal ones
schema::class.qualifiedName == "net.corda.finance.schemas.CashSchemaV1" || schema::class.qualifiedName == "net.corda.finance.schemas.CommercialPaperSchemaV1" }
schema::class.qualifiedName == "net.corda.finance.schemas.CashSchemaV1" ||
schema::class.qualifiedName == "net.corda.finance.schemas.CommercialPaperSchemaV1" ||
schema::class.qualifiedName == "net.corda.notary.jpa.JPANotarySchemaV1"
}
override val schemaOptions: Map<MappedSchema, SchemaService.SchemaOptions> = requiredSchemas + extraSchemas.associateBy({ it }, { SchemaOptions() })