I noticed that Hibernate does not yet support the JPA 2 metamodel with "collection of any" mappings (i.e. a field mapped with @ManyToAny)
Code:
if ( elementType.isAnyType() ) {
throw new UnsupportedOperationException( "collection of any not supported yet" );
}
I'd like to use the JPA 2 typesafe query API for my queries, but am OK with dropping down to the Hibernate API for queries using these particular types of associations. Is it possible to configure Hibernate to fit this desired usage? In other words, is it possible to get Hibernate to delay the throwing of this exception until someone attempts to actually use this metamodel element in a JPA 2 query?
Thanks!