@hasInverse
can link fields with different names, i.e. Post.author <-> Author.hasPosts
But I’m seeing that the @reverse
directive forces you to use the same name on both sides, i.e. author <-> ~author
.
Is there a way to have @reverse
use a different field name on the reverse relation, i.e author <-> ~hasPosts
?
MichelDiz
(Michel Diz)
2
No, cuz the reverse index is different from hasInverse in the GraphQL features. There’s no similar feature to hasInverse in DQL.
amaster507
(Anthony Master)
3
You can add an alias to it. Would that help?
An alias is one way, though I would prefer to not have to create it every time
I’m new to the community - is there a reason why GQL and DQL differ in this way?
amaster507
(Anthony Master)
5
1 Like