Announcement Announcement Module
Collapse
No announcement yet.
"Invalid derived query" error not working for Neo4j repositories Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • "Invalid derived query" error not working for Neo4j repositories

    Hi,

    I just upgraded from STS 3.1.0 to STS 3.2.0 and have noticed that invalid derived queries in Neo4j repositories no longer generate an error. This looks similar to STS-3107. The fix for that issue (commit 307a3a96a4a01c8957eafee075c4f7fb88006f8f) involved specifically adding a check for the "org.springframework.data.jpa.repository" package, so I'm guessing that another will be needed for the "org.springframework.data.neo4j.repository" package, plus more for any other Spring Data projects that use this error and whose repositories follow this package naming pattern.

    Geoff

  • #2
    Hey Geoff!

    You are absolutely right, I created this JIRA ticket for this:
    https://issuetracker.springsource.com/browse/STS-3264

    Should be fixed for 3.3.0.M1... :-)

    Thanks for reporting!
    -Martin

    Comment


    • #3
      I just installed 3.3.0.M2 for Kepler and have noticed that this validation is not working again. I haven't tried it on 3.3.0.M2 for Juno, so I don't know whether it is an Eclipse incompatibility, or if it is a regression, or if it is something else altogether.

      Geoff

      Comment


      • #4
        Hi Geoff,

        Is it possible for you to include a sample project and indicate where the missing error is? That would be really helpful.

        Thanks!
        Terry

        Comment


        • #5
          Sorry it took a while to get back to this. The attached project was created using STS 3.3.0.M2 (Juno) on Windows 7. If I open the workspace with that STS version and clean the project, everything builds fine. Running the test fails, however, the problem being that Spring Data cannot create an implementation of the MyClassRepository interface because the findBySomethingElse method does not match fields in the MyClass class (i.e. it needs a @Query annotation with a Cypher query).

          If I take the same project and open it using STS 3.3.0.M1 (Juno), then clean the project after it is opened (or simply modify the MyClassRepository interface and save it so that it recompiles), then an "Invalid derived query" validation error appears on the method in question.

          Spring Data validation appears to be enabled in the settings of both workspaces.

          Geoff

          Comment


          • #6
            Hi Geoff,

            Thanks for the reply. You're right that the warning doesn't show up on 3.3.0 M2. Can you try 3.3.0 RC2 and see if the error appears for you again? Thanks!

            Terry

            Comment


            • #7
              Hi Terry,

              Thanks for the link. Looks like the validation works correctly in 3.3.0.RC2. I tested with the Kepler version.

              Thanks again.

              Geoff

              Comment

              Working...
              X