I'm having issues adding a non id auto increment field in my orders table, the order number field should be handled by the database auto increment feature, I'm using postgres, the only catch is my field isn't the id of the table which gives me this error
is annotated @GeneratedValue but is not part of an identifier
My code
data class Order(
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
val id: UUID? = null,
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "order_number", unique = true, nullable = false, updatable = false, insertable = false)
val orderNumber: Long? = null,