File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
hibernate-entitymanager/src/main/java/org/hibernate/ejb/metamodel Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -479,7 +479,12 @@ else if ( type.isAssociationType() ) {
479479 final Attribute .PersistentAttributeType elementPersistentAttributeType ;
480480 final Attribute .PersistentAttributeType persistentAttributeType ;
481481 if (elementType .isAnyType ()) {
482- throw new UnsupportedOperationException ("collection of any not supported yet" );
482+ if ( context .isIgnoreUnsupported () ) {
483+ return null ;
484+ }
485+ else {
486+ throw new UnsupportedOperationException ("collection of any not supported yet" );
487+ }
483488 }
484489 final boolean isManyToMany = isManyToMany (member );
485490 if (elementValue instanceof Component ) {
@@ -500,7 +505,14 @@ else if ( type.isAssociationType() ) {
500505 final Value keyValue = ((Map )value ).getIndex ();
501506 final org .hibernate .type .Type keyType = keyValue .getType ();
502507
503- if (keyType .isAnyType ()) throw new UnsupportedOperationException ("collection of any not supported yet" );
508+ if (keyType .isAnyType ()) {
509+ if ( context .isIgnoreUnsupported () ) {
510+ return null ;
511+ }
512+ else {
513+ throw new UnsupportedOperationException ("collection of any not supported yet" );
514+ }
515+ }
504516 if (keyValue instanceof Component ) keyPersistentAttributeType = Attribute .PersistentAttributeType .EMBEDDED ;
505517 else if (keyType .isAssociationType ()) keyPersistentAttributeType = Attribute .PersistentAttributeType .MANY_TO_ONE ;
506518 else keyPersistentAttributeType = Attribute .PersistentAttributeType .BASIC ;
You can’t perform that action at this time.
0 commit comments