title: org.postgresql.util.PSQLException: No results returned by the query
body: <p>hey everyone am trying to insert data in a table using <code>@Query</code> annotation in my spring boot app am getting a postgres Exception : </p>
  
  <pre><code>org.postgresql.util.PSQLException:  No results returned by the query 
  </code></pre>
  
  <p>this is my code : </p>
  
  <p>this is the repository</p>
  
  <pre><code>@Query(value="INSERT INTO \"FCT_BY_DEV\"(\"IdDev\", \"IdFonction\") VALUES (?, ?) ",nativeQuery=true)
  public String isertfonctionstodev(int dev,int fonction);
  </code></pre>
  
  <p>this is the controller :</p>
  
  <pre><code>@RequestMapping(value="/function/insert", method = RequestMethod.POST)
  public String insererfonctions (int dev,int fonction){
      System.out.println("dev="+dev+"fonction="+fonction);
       fonctionRepository.isertfonctionstodev(dev, fonction);
       System.out.println("********");
       return "aaa";
   }
  </code></pre>
  
  <p>am using this service by $http in angularJs </p>
  
  <pre><code>$http.post("/function/insert?dev="+$scope.id+"&amp;fonction="+$scope.idf);
  </code></pre>
  
  <p>and finaly this is the server log </p>
  
  <pre><code>dev=16006fonction=14
  Hibernate: INSERT INTO "FCT_BY_DEV"("IdDev", "IdFonction") VALUES (?, ?) 
   2016-04-27 16:52:03.204  WARN 7036 --- [nio-8080-exec-2]    o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 0, SQLState: 02000
   2016-04-27 16:52:03.204 ERROR 7036 --- [nio-8080-exec-2] o.h.engine.jdbc.spi.SqlExceptionHelper   : Aucun résultat retourné par la requête.
  </code></pre>
  
  <p>the data is correct and i tried the same query with the same value and it worked why posgres is generating this exception and how can i fixed , thanks to any help  </p>