Hi, I’m struggling with a case, which I thought would be an easy thing.
What I want to achieve is a query handler that either returns an instance of the type to be returned or null, of there is no instance.
Regardless, of whatever I try, in case of non existing instances (which would let the query handler return null), I get exceptions saying that org.axonframework.serialization.UnknownSerializedType can’t be casted to the desired type.
What is the best practice for query handlers that might have to indicate that a certain queried does not exist?
Thanks