Completely new to Axon here.
I have a class defined in Kotlin:
data class ProjectedQuote(
@Id var submissionId: String,
var periodId: String,
var accountNumber: String
)
It gets instantiated and updated by event handlers, then it is returned in response to queries.
I'm needing to create a query that finds a ProjectedQuote instance by accountNumber
, not id
. I'm not sure how to do that.
To date, I've only done queries like:
SELECT q FROM ProjectedQuote q WHERE q.id LIKE CONCAT(:idStartsWith, '%') ORDER BY q.id
My narrowly-focused question is:
How do I write a query that finds ProjectedQuote using accountNumber
instead of id
?
My broader question is:
How can I see what fields are available to query by in the Axon databases?