Consulta de inserción nativa en el repositorio de JPA
@Repository
@Transactional
public interface FruitsRepository {
@Modifying
@Query(value = "insert into fruits_table (id, name) VALUES (?1, ?2)", nativeQuery = true)
void insertIntoFruitsTable(long id, String name);
}
Megative