Annotation Type AssociationInverseSide
-
@Documented @Target({METHOD,FIELD}) @Retention(RUNTIME) @PropertyMapping(processor=@PropertyMappingAnnotationProcessorRef(type=org.hibernate.search.mapper.pojo.mapping.definition.annotation.processing.impl.AssociationInverseSideProcessor.class)) public @interface AssociationInverseSide
Given an association from an entity typeAto an entity typeB, defines the inverse side of an association, i.e. the path fromBtoA.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.
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description ObjectPathinversePath
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description ContainerExtractionextraction
-
-
-
Element Detail
-
inversePath
ObjectPath inversePath
- Returns:
- The path to the targeted entity on the inverse side of the association.
-
-
-
extraction
ContainerExtraction extraction
- Returns:
- A definition of container extractors to be applied to the property,
allowing the definition of the inverse side of an association modeled by container elements.
This is useful when the property is of container type,
for example a
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. - See Also:
ContainerExtraction
- Default:
- @org.hibernate.search.mapper.pojo.extractor.mapping.annotation.ContainerExtraction
-
-