Is is possible to have Roo generate a String field which is filled with an UUID as PK instead of the auto-incremented Integers?
Is is possible to have Roo generate a String field which is filled with an UUID as PK instead of the auto-incremented Integers?
Hi,
We have done this in our project. We are using Roo, with Hibernate as the persistence provider, and implemented the UUIDs by pushing in the id into our Entity classes, and annotating like this:
AndyCode:@Id @GenericGenerator(name = "HibernateUuidGenerator", strategy = "uuid2") @GeneratedValue(generator = "HibernateUuidGenerator") private String id;
Thanks for that piece of information!
I wonder if it's possible to specify the generator in the roo script? I did not see any option for that. Maybe I should raise a JIRA-Ticket.
I am about to set up a project with many tables and would prefer to have the right config from start![]()
@yglodt
I think a JIRA ticket has been raised and declined.
Just as an FYI.