Skip to content

Commit 56d55c3

Browse files
authored
Fix introspection error result due to missing entity type (#521)
1 parent a415c6b commit 56d55c3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

schema/src/main/java/com/introproventures/graphql/jpa/query/schema/impl/GraphQLJpaSchemaBuilder.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,8 @@ private GraphQLFieldDefinition getAggregateFieldDefinition(EntityType<?> entityT
546546
var javaType = isPlural(association)
547547
? PluralAttribute.class.cast(association).getBindableJavaType()
548548
: association.getJavaType();
549-
var attributes = EntityIntrospector.resultOf(javaType).getAttributes();
549+
var javaTypeEntity = entityManager.getMetamodel().entity(javaType);
550+
var attributes = EntityIntrospector.introspect(javaTypeEntity).getAttributes();
550551
var fields = attributes
551552
.values()
552553
.stream()

0 commit comments

Comments
 (0)