You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems where clauses on a nested many-to-one relationship are ignored.
I've updated the example app to demonstrate the problem. There aren't enough '-to-one' relationships available in the example model to recreate so I've added a new one - a Droid's PrimaryFunction replacing String primaryFunction:
This simpler example works - only the Astromech is returned:
query {
Droids {
select {
name
primaryFunction(where:{function:{EQ:"Astromech"}}) {
function
}
}
}
}
But this one doesn't - the Protocol droid is also returned:
query {
Humans {
select {
id
name
homePlanet
favoriteDroid {
name
primaryFunction(where:{function:{EQ:"Astromech"}}) {
function
}
}
}
}
}
I've also applied the model changes to graphql-jpa-query-schema's tests and added the above two examples as tests - the second one currently fails as the Protocol droid and its parent Luke Skywalker should not be returned.
@molexx I think I am going to deprecate embedded many-to-one where criteria expressions in favor of #108. I do not like to deal with two implementations in the future.
It seems
where
clauses on a nested many-to-one relationship are ignored.I've updated the example app to demonstrate the problem. There aren't enough '-to-one' relationships available in the example model to recreate so I've added a new one - a Droid's PrimaryFunction replacing
String primaryFunction
:https://github.com/molexx/graphql-jpa-query/tree/filterNestedManyToOne/graphql-jpa-query-example/src/main/java/com/introproventures/graphql/jpa/query/example/model
This simpler example works - only the Astromech is returned:
But this one doesn't - the Protocol droid is also returned:
I've also applied the model changes to
graphql-jpa-query-schema
's tests and added the above two examples as tests - the second one currently fails as the Protocol droid and its parent Luke Skywalker should not be returned.https://github.com/molexx/graphql-jpa-query/blob/796b6488da4ece90b5ec705b097c0462740180fd/graphql-jpa-query-schema/src/test/java/com/introproventures/graphql/jpa/query/schema/StarwarsQueryExecutorTests.java#L615
The text was updated successfully, but these errors were encountered: