Skip to content

Commit

Permalink
HSEARCH-3277 Detect ORM 6 dynamic entities
Browse files Browse the repository at this point in the history
  • Loading branch information
fax4ever authored and yrodiere committed Oct 6, 2022
1 parent 07ecc6d commit 302a2e8
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -6,6 +6,7 @@
*/
package org.hibernate.search.mapper.orm.loading.impl;

import java.util.Map;
import java.util.Set;

import org.hibernate.MultiIdentifierLoadAccess;
Expand All @@ -24,7 +25,7 @@ public interface TypeQueryFactory<E, I> {
String uniquePropertyName) {
MetamodelImplementor metamodel = sessionFactory.getMetamodel();
EntityDomainType<?> typeOrNull = metamodel.entity( entityPersister.getEntityName() );
if ( typeOrNull != null ) {
if ( typeOrNull != null && !( entityPersister.getMappedClass().equals( Map.class ) ) ) {
return CriteriaTypeQueryFactory.create( typeOrNull, uniquePropertyName );
}
else {
Expand Down

0 comments on commit 302a2e8

Please sign in to comment.