I am trying to make a custom insert query in my interface that exnteds JpaRepository
public interface CustomerCouponDAO extends JpaRepository<CustomerCoupons, Integer>{
@Query("INSERT into customer_coupons (customerId, couponId) values (?,?)")
public void insert(Integer custid, Integer coup);
}
but when I get the exception:
Caused by: java.lang.IllegalArgumentException: JDBC style parameters (?) are not supported for JPA queries.
any ideas on how to make that insert query?