Answers for "generate UUID id for my entities"

0

generate UUID id for my entities

@Id  
@Column(updatable = false, nullable = false, columnDefinition = "uuid DEFAULT uuid_generate_v4()")
@GeneratedValue(generator = "UUID")
@GenericGenerator(name = "UUID", strategy = "org.hibernate.id.UUIDGenerator")
private UUID id;
Posted by: Guest on April-17-2021

Browse Popular Code Answers by Language