I have an abstract ancestor class for the comment table which has a trinary key. The key is in the CommentId
class which is marked as @Embeddable
. The three fields of the key are a long, enum, and a date. Each field of CommentId
has its own @Field
annotation explicitly referencing the LongBridge, EnumBridge, and DateBridge classes. Then in the Comment
class, the getId() method is marked as @EmbeddedId
. In the descendants the getId() method (overridden from the ancestor) is further annotated with @FieldBridge
to the custom class I wrote to handle all three. (Because apparently the Search related annotations cannot be put on an abstract class.)
My custom CommentIdFieldBridge implements TwoWayFieldBridge
class was built per various examples (not sure if it works or not).
No matter what I do, I still get this error during deployment:
Caused by: org.hibernate.search.exception.SearchException: HSEARCH000135: Unable to guess FieldBridge for id in gov.texas.dps.dld.dls.db.domain.dls.CommentId
at org.hibernate.search.bridge.impl.BridgeFactory.buildFieldBridge(BridgeFactory.java:283)
at org.hibernate.search.bridge.impl.BridgeFactory.buildFieldBridge(BridgeFactory.java:185)
at org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider.createIdPropertyMetadata(AnnotationMetadataProvider.java:359)
at org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider.checkDocumentId(AnnotationMetadataProvider.java:258)
at org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider.initializeMemberLevelAnnotations(AnnotationMetadataProvider.java:1062)
at org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider.initializeClass(AnnotationMetadataProvider.java:599)
at org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider.doGetTypeMetadataFor(AnnotationMetadataProvider.java:192)
at org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider.getTypeMetadataFor(AnnotationMetadataProvider.java:181)
at org.hibernate.search.engine.metadata.impl.AnnotationMetadataProvider.getTypeMetadataFor(AnnotationMetadataProvider.java:165)
at org.hibernate.search.spi.SearchIntegratorBuilder.initDocumentBuilders(SearchIntegratorBuilder.java:445)