title: How to handle ERROR: duplicate key value violates unique constraint when data contains lot of duplicates
body: <p>My application contains lot of duplicate data, so basically its my data issue, but I would want to proceed further and insert data which are not duplicate.</p>
  
  <p>I am using spring boot with jpa and postgres Sql.</p>
  
  <pre><code>@Entity
  @Table(name="city_Info")
  public class City {
      @Id
      @Column
  
      private Integer city_id;
      @Column
      private String city;
      @Column
      private String country;
  }
  </code></pre>
  
  <p>Here Primary key consists of city and country.</p>
  
  <p>Application.properties</p>
  
  <pre><code>spring.jpa.database=POSTGRESQL
  spring.datasource.platform=postgres
  spring.jpa.show-sql=true
  spring.jpa.hibernate.ddl-auto=none
  spring.database.driverClassName=org.postgresql.Driver
  </code></pre>
  
  <p>Any help ? </p>