Enhancement 352 : ENHANCEMENT - Add @UUID support for String UUID generation
Priority 
High
Reported Version 
 
Logged By 
Rob
Status 
Fixed
Fixed Version 
github
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
26/01/2011
Updated 
26/01/2011
Type 
Enhancement
 
Attachments 
No attachments

Currently, when I want to use a uuid as the primary key, I need to
declare as:

public class User {
@Id
public UUID id;
}

It works well, but sometimes not convenient. For example, if I want to
dump a user instance to yaml, or json, the id can't be converted,
because they don't know how to convert UUID

I hope ebean can provide an annotation, such as @UUID(or other), then
we can use String as the type:

public class User {
@Id
@UUID
public String id;
}

Is it possible?

 
woResponse

Upload a file