I know that we can generate a random UUID -
@Id
@GeneratedValue(generator="system-uuid")
@GenericGenerator(name="system-uuid", strategy = "uuid")
private String myId;
But UUID is a String if size 32. How can i generate a random alphanumeric string of size 6 and store as ID?
I want to store this in MongoDB