Closed ghusta closed 5 years ago
Fixed with the latest update.
The issue causes due to String data type I have fixed it using below code
@Entity
public class Message {
//when we use id data type Long or Integer
// @Id
// @GeneratedValue(strategy = GenerationType.AUTO)
// Long id;
//when we use id data type String
@Id @GeneratedValue(generator="system-uuid")
@GenericGenerator(name="system-uuid", strategy = "uuid")
String id;
@Column(nullable = false)
String text;
//setter & getter
}
Id will be created as 4028818e72ad878b0172ad8791c40000 its length will be 32
Problem occurs when saving a Person with JPA and Postgres, and using a sequence.