Hi,
It’s definitely a bug that you’re getting an NPE. Even on an @Indexed
class, you should get a cleaner error message. I’ll look into that: HSEARCH-3874. Thanks for bringing this to my attention.
Regarding @IdClass
, indeed they are not supported for @Indexed
entities at the moment. It will be addressed in HSEARCH-1715. I don’t think there’s a workaround at the moment, as you would need to define an IdentifierBridge to convert between your entity ID and the document ID (a string), and currently you need to apply the @DocumentId
annotation to a property in order to do that. If you need this right now, I’d suggesting switching from using @IdClass
to using @EmbeddedId
, at least until we fix HSEARCH-1715.