use of org.hibernate.boot.jaxb.mapping.spi.JaxbManyToMany in project hibernate-orm by hibernate.
the class JPAXMLOverriddenAnnotationReader method getManyToMany.
/**
* @see #getOneToOne(List, XMLContext.Default)
* @see #getElementCollection(List, XMLContext.Default)
*/
private void getManyToMany(List<Annotation> annotationList, XMLContext.Default defaults) {
Class<ManyToMany> annotationType = ManyToMany.class;
List<JaxbManyToMany> elements = elementsForProperty.getManyToMany();
for (JaxbManyToMany element : elements) {
AnnotationDescriptor ad = new AnnotationDescriptor(annotationType);
addTargetClass(element.getTargetEntity(), ad, "target-entity", defaults);
getFetchType(ad, element.getFetch());
getCascades(ad, element.getCascade(), defaults);
getJoinTable(annotationList, element, defaults);
copyAttribute(ad, "mapped-by", element.getMappedBy(), false);
annotationList.add(AnnotationFactory.create(ad));
getOrderBy(annotationList, element.getOrderBy());
getMapKey(annotationList, element.getMapKey());
getMapKeyClass(annotationList, element.getMapKeyClass(), defaults);
getMapKeyColumn(annotationList, element.getMapKeyColumn());
getOrderColumn(annotationList, element.getOrderColumn());
getMapKeyTemporal(annotationList, element.getMapKeyTemporal());
getMapKeyEnumerated(annotationList, element.getMapKeyEnumerated());
Annotation annotation = getMapKeyAttributeOverrides(element.getMapKeyAttributeOverride(), defaults);
addIfNotNull(annotationList, annotation);
getMapKeyJoinColumns(annotationList, element.getMapKeyJoinColumn());
getAccessType(annotationList, element.getAccess());
}
afterGetAssociation(annotationType, annotationList, defaults);
}
Aggregations