@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "username_sequence") @SequenceGenerator(name = "username_sequence", sequenceName = "partner_user_sequence", allocationSize = 1) @Column(name = "username", nullable = false, updatable = false) private Long username; 

Caused by: org.postgresql.util.PSQLException: ERROR: null value in column "username" violates not-null constraint

I can't understand what I'm doing wrong

  • You send null somewhere for username - not a Programmer
  • @not a programmer no i'm not giving up - Astral
  • null value in column "username" - this text from the error does not tell you anything? - not a Programmer
  • @not a Programmer Partner partner = new Partner (); partner.setTin (partnerRequestDTO.getTin ()); partner = partnerRepository.save (partner); - Astral
  • The value is not set. - Roman C

0