use of org.hibernate.boot.jaxb.mapping.spi.JaxbOneToMany in project hibernate-orm by hibernate.
the class JPAXMLOverriddenAnnotationReader method getOneToMany.
private void getOneToMany(List<Annotation> annotationList, XMLContext.Default defaults) {
Class<OneToMany> annotationType = OneToMany.class;
List<JaxbOneToMany> elements = elementsForProperty.getOneToMany();
for (JaxbOneToMany 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);
buildJoinColumns(annotationList, element.getJoinColumn());
copyAttribute(ad, "orphan-removal", element.isOrphanRemoval(), false);
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