Reputation: 99
I am following the cordapp example code and created IOUs. Can anyone please let me know where can I see the primary key of its H2 database ? How Can I update to have a composite key ?
Upvotes: 0
Views: 112
Reputation: 23140
The database schema for IOUState
is defined here: https://github.com/corda/cordapp-example/blob/release-V3/kotlin-source/src/main/kotlin/com/example/schema/IOUSchema.kt.
All state schemas must subclass PersistentState
. PersistentState
sets the state table's primary key to a composite key which is an instance of PersistentStateRef
. PersistentStateRef
combines:
As of Corda 3, you cannot change the state's table to use a different primary key.
Upvotes: 1