1

I am relatively new to Slick and I keep getting the org.postgresql.util.PSQLException: ERROR: null value in column "id" violates not-null constraint message.

I found plenty of examples with Slick 1.x but none of them seem to work with Slick 2.0 Can someone point to a working example with Slick 2.x (I have 2.0.1) and Postgres?

Thank you.

Daghan ---
  • 1,147
  • 1
  • 9
  • 10

2 Answers2

1

Thanks for the example. I did fix my problem. The hint came from this stackoverflow answer .

In my original table, the primary key was integer.

I had to change it to serial.

Now, things work like a charm

Community
  • 1
  • 1
Daghan ---
  • 1,147
  • 1
  • 9
  • 10
0

Slick-2.0.1 example with postgreSQL database : https://github.com/satendrakumar06/slickwithpostgresql

Sky
  • 2,509
  • 1
  • 19
  • 28