use of org.hibernate.boot.jaxb.mapping.spi.JaxbManyToOne in project hibernate-orm by hibernate.
the class JPAXMLOverriddenAnnotationReader method getManyToOne.
/**
* @see #getOneToOne(List, XMLContext.Default)
* @see #getElementCollection(List, XMLContext.Default)
*/
private void getManyToOne(List<Annotation> annotationList, XMLContext.Default defaults) {
Class<ManyToOne> annotationType = ManyToOne.class;
List<JaxbManyToOne> elements = elementsForProperty.getManyToOne();
for (JaxbManyToOne 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, "optional", element.isOptional(), false);
annotationList.add(AnnotationFactory.create(ad));
getAssociationId(annotationList, element.isId());
getMapsId(annotationList, element.getMapsId());
getAccessType(annotationList, element.getAccess());
}
afterGetAssociation(annotationType, annotationList, defaults);
}
Aggregations