Corda 4.1:如何使用嵌入对象中的字段查询PersistentState?

Corda 4.1:如何使用嵌入对象中的字段查询PersistentState?,corda,Corda,在我的代码中,constract属于PersistentDeal,它是PersistentDealState的嵌入式对象PersistentDealState是从ContractState扩展而来的DealState的架构 如何获取DealStategivingconstrucd作为查询criteria的查询参数 此查询条件不起作用 val result = builder { val criteria = DealSchemaV1.PersistentDealState::de

在我的代码中,
constract
属于
PersistentDeal
,它是
PersistentDealState
的嵌入式对象
PersistentDealState
是从
ContractState
扩展而来的
DealState
的架构

如何获取
DealState
giving
construcd
作为查询criteria的查询参数

此查询条件不起作用

val result = builder {
        val criteria = DealSchemaV1.PersistentDealState::deal.equal(DealSchemaV1.PersistentDeal::tcmContractID.equal(contractId))
        val queryCriteria = QueryCriteria.VaultCustomQueryCriteria(expression = criteria, contractStateTypes = setOf(DealState::class.java),status = status)
        vaultService.queryBy<DealState>(queryCriteria)
    }

目前无法使用
VaultCustomQueryCriteria
为嵌入对象指定可过滤标准。 请通过我们的GitHub网站提出问题()以请求此项

当前可用的选项是使用JDBC会话:

或JPA实体经理(和HQL):

@Entity
    @Table(name = "DealState",
            indexes = [Index(name = "contract_id_index", columnList = "contract_id")])
    class PersistentDealState(

            @Embedded
            var deal: PersistentDeal

            some other fields...

    ) : PersistentState()


    @Embeddable
    class PersistentDeal(

            @Column(name = "contract_id")
            var contractID: Long,

            some other fields...
    )