your right that is waste of cpu power we could change it, but then we would have to tell jpa to use the getter instead of the field, like this:

private String id = null;

@Id
public String getId() {
if (id == null)

{ id = UUID.randomUUID().toString(); }

return this.id;
}

but then I get an error in the test MappingException: Could not determine type for: java.util.Set, at table: AbstractVariant, for columns: [org.hibernate.mapping.Column(installations)]

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira