ToMove2017 / Esercitazione02

Esercitazione 2 di Applicazioni Internet
0 stars 0 forks source link

duplicate key in BusLineStop table #1

Closed MartinoMensio closed 7 years ago

MartinoMensio commented 7 years ago

Details:

Exception in thread "main" java.lang.RuntimeException: insert bus line stop failed: ERROR: duplicate key value violates unique constraint "buslinestop_pkey"
  Dettaglio: Key (stopid, lineid)=(1442, 54) already exists.
    at it.polito.ai.lab2.JdbcWriter.insertBusLineStop(JdbcWriter.java:66)
    at it.polito.ai.lab2.JdbcWriter.insertBusLine(JdbcWriter.java:47)
    at it.polito.ai.lab2.Main.main(Main.java:29)
MartinoMensio commented 7 years ago

Modified schema after asking professor. Closed by eef1a1a adding the sequence number as part of the primary key of the table BusLineStop