title: Annotations are not allowed here
body: <p>I'm creating a UserRepository which implements JpaRepository and works with User entity. I need a method to update username. I decided to do it with the help of @Query. But it's marked by Intellij. Here is my code for repository:</p>
  
  <pre><code>@Repository
  public interface UserRepository extends JpaRepository&lt;User, Long&gt; {
  
  @Modifying
  @Query(value = "update User user set user.name= %?username"))
  void updatingUser(@Param(value = "username") String username);
  }
  </code></pre>
  
  <p>And for Entity:</p>
  
  <pre><code>@Entity
  @Table(name = "users")
  public class User {
  
  @Id
  @GeneratedValue(strategy = GenerationType.AUTO)
  @Column(name = "user_id")
  private Long id;
  
  @NotNull
  @Column(name = "user_name")
  private String username;
  }
  </code></pre>
  
  <p>And I faced with such a problem: "Annotations are not allowed here" says Intellij Idea and marks the line with @Query annotation. And it made me confused</p>