sts4 icon indicating copy to clipboard operation
sts4 copied to clipboard

[Spring Data Queries] Navigate to definition of Java fields and methods used in queries

Open BoykoAlex opened this issue 1 year ago • 7 comments

Consider the following HQL query:

SELECT DISTINCT owner FROM Owner owner left join  owner.pets WHERE owner.lastName LIKE :lastName%

The pets property from Owner class can be navigated to. The same goes for instance methods if any are used.

BoykoAlex avatar Aug 26 '24 15:08 BoykoAlex

Fixed with 00636085cadeb624448de8a0c8f2cba41d50dce4

BoykoAlex avatar Aug 28 '24 02:08 BoykoAlex

I do See navigation working from Owner to the corresponding Java class definition, but I don't see pets in the owner.pets part navigating to anything. Therefore, re-opening this issue.

I also haven't seen a test case around this case (pets here), so maybe some work left here.

martinlippert avatar Aug 28 '24 13:08 martinlippert

Similar, I don't see lastName navigate to anything in owner.lastName`

SELECT DISTINCT owner FROM Owner owner left join  owner.pets WHERE owner.lastName LIKE :lastName%

martinlippert avatar Aug 28 '24 13:08 martinlippert

Oops, I have only meant to address the parameters... let me open a separate issue for parameters and resolve it and keep this one opened for later as it'll require some type attribution work for the query AST nodes

BoykoAlex avatar Aug 28 '24 13:08 BoykoAlex

Parameters "go to definition" has moved to #1336

The fields and methods are to be handled here.

BoykoAlex avatar Aug 28 '24 13:08 BoykoAlex

@BoykoAlex So this issue can be closed as fixed, right?

martinlippert avatar Oct 14 '24 11:10 martinlippert

Nope, this one remains opened while the parameters support is extracted into a separate issue and that issues is fixed and closed.

BoykoAlex avatar Oct 14 '24 14:10 BoykoAlex