1 Reply Latest reply on May 18, 2016 9:23 AM by koen.aers

    JBDS 8.1.0.GA suddenly doesn't validate JPA 2.1 NamedQueries

    simplex-software

      Greetings,

       

      In a given maven project, having JPA facet and using JPA 2.1, the following named query

       

      @NamedQuery(name = "myQuery", query = "UPDATE MyEntity j set j.f1 = :f1, j.f2 = :f2, j.f3 = :f3, j.f4 = :f4, j.f5 = :f5, j.f6 = :f6, j.f7 =:f7, where j.id = :id");

       

      is flaged with the following compilation error:

       

      Input parameters can only be used in WHERE clause or HAVING clause in a query.

       

      Building with maven doesn't raise any error and the code works properly. The error is displayed only in JBDS. Using another Eclipse based IDE, for example IBM RAD doesn't raise any error. And even in JBDS, not all the projects have this behaviour.

       

      Many thanks in advance for your help.

       

      Kind regards,

       

      Nicolas DUMINIL