Here\'s a list of my classes
@MappedSuperclass
public abstract class JpaModel {
@Id
@Column(name =\"ID\", columnDefinition = \"serial\")
@Genera
From your log, it shows id=null
, which is not related to inventoryItemPicture at all.
The issue is at @GeneratedValue(strategy = GenerationType.IDENTITY)
Your log shows you are using postgresql, but "IDENTITY" can only be used for these dbs:
You should use GenerationType.SEQUENCE
, which is supported by:
Try change your code to this:
@GeneratedValue(strategy = GenerationType.SEQUENCE)