Fixed @Any and @ManyToAny support in overridden JPA annotation reader HHH-4261

This commit is contained in:
amkad 2013-02-22 14:18:52 +07:00 committed by Brett Meyer
parent 95d113f8d2
commit 3a07c28c08
1 changed files with 6 additions and 0 deletions

View File

@ -122,8 +122,10 @@ import org.dom4j.Element;
import org.jboss.logging.Logger; import org.jboss.logging.Logger;
import org.hibernate.AnnotationException; import org.hibernate.AnnotationException;
import org.hibernate.annotations.Any;
import org.hibernate.annotations.Cascade; import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.Columns; import org.hibernate.annotations.Columns;
import org.hibernate.annotations.ManyToAny;
import org.hibernate.annotations.common.annotationfactory.AnnotationDescriptor; import org.hibernate.annotations.common.annotationfactory.AnnotationDescriptor;
import org.hibernate.annotations.common.annotationfactory.AnnotationFactory; import org.hibernate.annotations.common.annotationfactory.AnnotationFactory;
import org.hibernate.annotations.common.reflection.AnnotationReader; import org.hibernate.annotations.common.reflection.AnnotationReader;
@ -205,6 +207,8 @@ public class JPAOverriddenAnnotationReader implements AnnotationReader {
annotationToXml.put( OneToOne.class, "one-to-one" ); annotationToXml.put( OneToOne.class, "one-to-one" );
annotationToXml.put( OneToMany.class, "one-to-many" ); annotationToXml.put( OneToMany.class, "one-to-many" );
annotationToXml.put( ManyToMany.class, "many-to-many" ); annotationToXml.put( ManyToMany.class, "many-to-many" );
annotationToXml.put( Any.class, "any" );
annotationToXml.put( ManyToAny.class, "many-to-any" );
annotationToXml.put( JoinTable.class, "join-table" ); annotationToXml.put( JoinTable.class, "join-table" );
annotationToXml.put( JoinColumn.class, "join-column" ); annotationToXml.put( JoinColumn.class, "join-column" );
annotationToXml.put( JoinColumns.class, "join-column" ); annotationToXml.put( JoinColumns.class, "join-column" );
@ -396,6 +400,8 @@ public class JPAOverriddenAnnotationReader implements AnnotationReader {
getAssociation( OneToOne.class, annotationList, defaults ); getAssociation( OneToOne.class, annotationList, defaults );
getAssociation( OneToMany.class, annotationList, defaults ); getAssociation( OneToMany.class, annotationList, defaults );
getAssociation( ManyToMany.class, annotationList, defaults ); getAssociation( ManyToMany.class, annotationList, defaults );
getAssociation( Any.class, annotationList, defaults );
getAssociation( ManyToAny.class, annotationList, defaults );
getElementCollection( annotationList, defaults ); getElementCollection( annotationList, defaults );
addIfNotNull( annotationList, getSequenceGenerator( elementsForProperty, defaults ) ); addIfNotNull( annotationList, getSequenceGenerator( elementsForProperty, defaults ) );
addIfNotNull( annotationList, getTableGenerator( elementsForProperty, defaults ) ); addIfNotNull( annotationList, getTableGenerator( elementsForProperty, defaults ) );