@Documented @Target(value={METHOD,FIELD}) @Retention(value=RUNTIME) @PropertyMapping(processor=@PropertyMappingAnnotationProcessorRef(type=org.hibernate.search.mapper.pojo.mapping.definition.annotation.processing.impl.AssociationInverseSideProcessor.class)) public @interface AssociationInverseSide
A to an entity type B,
defines the inverse side of an association,
i.e. the path from B to A.
This annotation is generally not needed, as inverse sides of associations should generally be inferred by the mapper.
For example, Hibernate ORM defines inverse sides using @OneToMany#mappedBy, @OneToOne#mappedBy, etc.,
and the Hibernate ORM mapper will register these inverse sides automatically.
| Modifier and Type | Required Element and Description |
|---|---|
ObjectPath |
inversePath |
| Modifier and Type | Optional Element and Description |
|---|---|
ContainerExtraction |
extraction |
public abstract ObjectPath inversePath
public abstract ContainerExtraction extraction
Map<EntityA, EntityB>:
defining the extraction as @ContainerExtraction(BuiltinContainerExtractors.MAP_KEY)
allows referring to the association modeled by the map keys instead of the one modeled by the map values.
By default, Hibernate Search will try to apply a set of extractors for common container types.ContainerExtractionCopyright © 2006-2020 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.